diff --git a/src/components/form-field/radio-box/radio-box-option.tsx b/src/components/form-field/radio-box/radio-box-option.tsx index 2425cd26..a3e666ca 100644 --- a/src/components/form-field/radio-box/radio-box-option.tsx +++ b/src/components/form-field/radio-box/radio-box-option.tsx @@ -11,6 +11,19 @@ export interface RadioBoxOptionProps { className?: string; } +export const radioBoxContainerStyles = { + base: "group relative flex items-center gap-3 rounded-lg border p-4 border-neutral-300 hover:border-primary-500 hover:bg-primary-50", + checked: "border-primary-500 bg-primary-500 hover:bg-primary-500 hover:text-neutral-0", + disabled: + "border-neutral-400 bg-neutral-100 group-hover:border-neutral-400 group-hover:bg-neutral-100 hover:border-neutral-400 hover:bg-neutral-100", +}; + +export const radioBoxCircleStyles = { + base: "relative inline-block h-4 w-4 shrink-0 rounded-full bg-neutral-0 border border-neutral-400", + unchecked: "group-hover:border-primary-500 group-hover:bg-neutral-0", + disabled: "bg-neutral-100 group-hover:border-neutral-400 group-hover:bg-neutral-100", +}; + export const RadioBoxOption = ({ children, value, @@ -27,47 +40,42 @@ export const RadioBoxOption = ({ {({ checked, disabled: optionDisabled }) => (
{recommendationText && ( {recommendationText} )} - {checked && ( - )} - +
-

{children} -

+ )} diff --git a/src/components/form-field/radio-box/radio-box.stories.tsx b/src/components/form-field/radio-box/radio-box.stories.tsx index 0278e275..68315901 100644 --- a/src/components/form-field/radio-box/radio-box.stories.tsx +++ b/src/components/form-field/radio-box/radio-box.stories.tsx @@ -21,7 +21,7 @@ const RadioBoxWithHooks = () => {

Option 1

-

+

To be, or not to be, that is the question: Whether ’tis nobler in the mind to suffer The slings and arrows of outrageous fortune, …

@@ -31,7 +31,7 @@ const RadioBoxWithHooks = () => {

Option 2

-

+

To be, or not to be, that is the question: Whether ’tis nobler in the mind to suffer The slings and arrows of outrageous fortune, …

@@ -41,7 +41,7 @@ const RadioBoxWithHooks = () => {

Option 3

-

+

To be, or not to be, that is the question: Whether ’tis nobler in the mind to suffer The slings and arrows of outrageous fortune, …