|
|
|
@ -11,6 +11,7 @@ interface Props {
|
|
|
|
|
items: SessionRadioItems;
|
|
|
|
|
group: string;
|
|
|
|
|
onClick: (selectedValue: string) => void;
|
|
|
|
|
radioPosition?: 'left' | 'right';
|
|
|
|
|
style?: CSSProperties;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -31,7 +32,7 @@ const StyledFieldSet = styled.fieldset`
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const SessionRadioGroup = (props: Props) => {
|
|
|
|
|
const { items, group, initialItem, style } = props;
|
|
|
|
|
const { items, group, initialItem, radioPosition, style } = props;
|
|
|
|
|
const [activeItem, setActiveItem] = useState('');
|
|
|
|
|
|
|
|
|
|
useMount(() => {
|
|
|
|
@ -55,6 +56,7 @@ export const SessionRadioGroup = (props: Props) => {
|
|
|
|
|
props.onClick(value);
|
|
|
|
|
}}
|
|
|
|
|
beforeMargins={'0 var(--margins-sm) 0 0 '}
|
|
|
|
|
radioPosition={radioPosition}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|