From d8fabd8ea18d6b806bc1e54223448a3a79e78a76 Mon Sep 17 00:00:00 2001 From: Thoriq Firdaus <2067467+tfirdaus@users.noreply.github.com> Date: Wed, 25 Dec 2024 22:27:38 +0700 Subject: [PATCH] Render label when it's provided (#31) --- .../kubrick/src/RadioGroup/RadioGroup.tsx | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/packages/kubrick/src/RadioGroup/RadioGroup.tsx b/packages/kubrick/src/RadioGroup/RadioGroup.tsx index 232c2d9..cb1c3fb 100644 --- a/packages/kubrick/src/RadioGroup/RadioGroup.tsx +++ b/packages/kubrick/src/RadioGroup/RadioGroup.tsx @@ -66,25 +66,27 @@ export const RadioGroup = forwardRef( data-description-area={descriptionArea} ref={ref} > - - {label} - {isRequired ? - - * - - : ''} - + {label && ( + + {label} + {isRequired ? + + * + + : ''} + + )}