Skip to content

Commit

Permalink
fix: RadioButton label optional 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Jun 4, 2024
1 parent 5e57c8c commit f1d8477
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/wow-ui/src/components/RadioGroup/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import RadioContext from "@/components/RadioGroup/RadioContext";
*
* @property {boolean} [disabled] - 라디오 버튼이 비활성화되어 있는지 여부.
* @property {string} value - 라디오 버튼의 값.
* @property {string} label - 라디오 버튼의 라벨.
* @property {string} [label] - 라디오 버튼의 라벨.
*/

export interface RadioButtonProps {
disabled?: boolean;
value: string;
label: string;
label?: string;
}

const RadioButton = ({ disabled = false, value, label }: RadioButtonProps) => {
Expand Down Expand Up @@ -59,7 +59,7 @@ const RadioButton = ({ disabled = false, value, label }: RadioButtonProps) => {
})}
onChange={group.onChange}
/>
<styled.span textStyle="body2">{label}</styled.span>
{label && <styled.span textStyle="body2">{label}</styled.span>}
</styled.label>
);
};
Expand Down Expand Up @@ -128,6 +128,7 @@ const radioButtonStyle = cva({

const labelStyle = cva({
base: {
width: "fit-content",
display: "flex",
alignItems: "center",
gap: "xs",
Expand Down

0 comments on commit f1d8477

Please sign in to comment.