packages/ui: fix Radio space usage
This commit is contained in:
parent
7d16bf2e53
commit
c983166cba
@ -14,15 +14,15 @@ export function Radio({ value = null, options, spaceProps, onChange, ...props }:
|
||||
if (onChange) onChange(event.target.value);
|
||||
}
|
||||
|
||||
const buttons = options?.map((option) => (
|
||||
<AntRadio key={option.value as Key} value={option.value}>
|
||||
{option.label}
|
||||
</AntRadio>
|
||||
));
|
||||
|
||||
return (
|
||||
<AntRadio.Group onChange={handleChange} value={value} {...props}>
|
||||
<Space {...spaceProps}>
|
||||
{options?.map((option) => (
|
||||
<AntRadio key={option.value as Key} value={option.value}>
|
||||
{option.label}
|
||||
</AntRadio>
|
||||
))}
|
||||
</Space>
|
||||
{spaceProps ? <Space {...spaceProps}>{buttons}</Space> : buttons}
|
||||
</AntRadio.Group>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user