@patreon/studio
Version:
Patreon Studio Design System
14 lines • 896 B
JSX
'use client';
import React from 'react';
import { BodyText } from '../../BodyText';
import { RadioInput } from '../RadioInput/RadioInput';
import { RadioContent, RadioLabel } from './components';
export function RadioButton({ id, alignLabel = 'flex-start', checked, 'data-tag': dataTag, children, disabled, name, onChange, value, alignButton = 'left', 'button-data-tag': buttonDataTag, }) {
return (<RadioLabel alignLabel={alignLabel} checked={checked} data-tag={dataTag} disabled={disabled} htmlFor={id} alignButton={alignButton}>
<RadioInput id={id} name={name} value={value} type="radio" checked={checked} onChange={onChange} disabled={disabled} readOnly={checked || disabled} data-tag={buttonDataTag}/>
{children && (<RadioContent disabled={disabled}>
<BodyText>{children}</BodyText>
</RadioContent>)}
</RadioLabel>);
}
//# sourceMappingURL=index.jsx.map