Skip to content

Commit

Permalink
Merge pull request #108 from abusix/ahq2-87-adjust-hailstorm-radiobox…
Browse files Browse the repository at this point in the history
…-component

BREAKING CHANGE: remove default radio box orientation
  • Loading branch information
mnlfischer authored Feb 13, 2024
2 parents 811cc67 + 7e422df commit 0d8499f
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 0d8499f

Please sign in to comment.