Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Select and input text height not matching each other #562

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
))
Loading