Skip to content

Commit

Permalink
BREAKING CHANGE: remove default radio box orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlfischer committed Feb 13, 2024
1 parent 811cc67 commit 7e422df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/components/form-field/radio-box/radio-box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ const RadioBoxWithHooks = () => {

return (
<FormField>
<FormField.RadioBox id="value" value={value} onChange={setValue}>
<FormField.RadioBox
id="value"
value={value}
onChange={setValue}
className="flex flex-col gap-2"
>
<FormField.RadioBox.Option value="value_1">
<FeaturedTag>Recommended</FeaturedTag>

Expand Down
5 changes: 3 additions & 2 deletions src/components/form-field/radio-box/radio-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ export interface RadioBoxProps {
children: React.ReactNode;
value: string;
onChange: (value: string) => void;
className?: string;
}

export const RadioBox = ({ id, value, children, onChange }: RadioBoxProps) => {
export const RadioBox = ({ id, value, children, onChange, className }: RadioBoxProps) => {
return (
<RadioGroup id={id} value={value} onChange={onChange} className="flex flex-col gap-2">
<RadioGroup id={id} value={value} onChange={onChange} className={className}>
{children}
</RadioGroup>
);
Expand Down

0 comments on commit 7e422df

Please sign in to comment.