Skip to content

Commit

Permalink
fixed vertical align
Browse files Browse the repository at this point in the history
  • Loading branch information
Aref-Akminasi committed Oct 21, 2024
1 parent cffc6c9 commit e7e8f91
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/components-css/form-field-radio-option/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
.utrecht-form-field--radio .utrecht-form-field__label {
--utrecht-form-label-font-weight: var(--rhc-form-field-radio-option-font-weight, inherit);
}

.rhc-radio {
vertical-align: middle;
}
9 changes: 6 additions & 3 deletions packages/components-react/src/FormFieldRadioOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ export const FormFieldRadioOption = forwardRef(
[statusId]: status,
}) || undefined
}
className={clsx({
'utrecht-radio-button--html-radio-button-rtl': dir === 'rtl',
})}
className={clsx(
{
'utrecht-radio-button--html-radio-button-rtl': dir === 'rtl',
},
'rhc-radio',
)}
{...restProps}
></Radio>
</div>
Expand Down
5 changes: 4 additions & 1 deletion packages/storybook/src/community/radio-group.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import type { Meta, StoryObj } from '@storybook/react';

const RadioGroupStory = () => (
<div className="rhc-radio-group">
<FormFieldRadioOption label="Radio option" name="radio-option" />
<FormFieldRadioOption
label="Radio option Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id tempus ex. Vestibulum auctor sagittis sagittis."
name="radio-option"
/>
<FormFieldRadioOption label="Radio option" name="radio-option" />
<FormFieldRadioOption label="Radio option" name="radio-option" />
<FormFieldRadioOption label="Radio option" name="radio-option" />
Expand Down

0 comments on commit e7e8f91

Please sign in to comment.