Skip to content

Commit

Permalink
fix: Select and input text height not matching each other (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio authored Oct 9, 2024
1 parent 8ac9d05 commit f56ec5b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/SelectField/SelectField.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
border-bottom: 2px solid var(--divider);
padding: 2px 0px 0px 0px;
width: 100%;
margin-top: 8px;
margin-top: 6px;
min-height: 40px;
}

Expand Down Expand Up @@ -37,7 +37,7 @@
font-size: 20px;
font-weight: 500;
font-family: var(--font-family);
line-height: 30px;
line-height: 24px;
}

.dcl.select-field .ui.dropdown > .default.text {
Expand All @@ -59,6 +59,7 @@
padding-right: 0px;
padding-bottom: 0px;
color: var(--text);
top: 0.4em;
}

.dcl.select-field.border .ui.dropdown .dropdown.icon {
Expand Down Expand Up @@ -148,8 +149,6 @@
}

.dcl.select-field.error .ui.selection.dropdown > i.icon:before {
/* content: '';
display: none; */
color: var(--error);
}

Expand Down
18 changes: 18 additions & 0 deletions src/components/SelectField/SelectField.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react'
import { storiesOf } from '@storybook/react'
import { Header } from '../Header/Header'
import { SelectField } from './SelectField'
import { Field } from '../Field/Field'

storiesOf('SelectField', module)
.add('Basic', () => (
Expand Down Expand Up @@ -155,3 +156,20 @@ storiesOf('SelectField', module)
/>
</>
))
.add('Select field aligned with input field', () => (
<div
style={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
gap: '10px',
width: '500px'
}}
>
<SelectField
placeholder="Placeholder"
options={[{ key: 1, text: 'Choice 1', value: 1 }]}
/>
<Field placeholder="Placeholder" value="A value" />
</div>
))

0 comments on commit f56ec5b

Please sign in to comment.