diff --git a/src/v1/base/RadioButton.tsx b/src/v1/base/RadioButton.tsx index 2072b61d..219ab84e 100644 --- a/src/v1/base/RadioButton.tsx +++ b/src/v1/base/RadioButton.tsx @@ -1,14 +1,14 @@ import { ComponentPropsWithoutRef, forwardRef, Ref } from 'react'; +type RadioButtonProps = { + label?: string; +} & Omit, 'id' | 'type' | 'className'>; + const BASE_RADIO_BUTTON_CLASSES = 'px-[1.2rem] py-[0.5rem] bg-main-600/[0.18] text-main-900 text-sm font-normal rounded-[2rem] cursor-pointer w-full h-full peer-checked:bg-main-900 peer-checked:text-white'; const RadioButton = ( - { - name, - value, - ...props - }: Omit, 'id' | 'type' | 'className'>, + { name, value, label, ...props }: RadioButtonProps, ref: Ref ) => { return ( @@ -22,7 +22,7 @@ const RadioButton = ( ref={ref} {...props} /> - {value} + {label ?? value} ); };