Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
remypar5 committed Jan 3, 2025
1 parent 0289e0e commit 834c639
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ export const Visual = createVisualRegressionStory(() => (
<div className="utrecht-document">
<h4 className="utrecht-heading-3">Light</h4>
<VisualRegressionWrapper className={`lux-theme--logius-light`}>
<VisualStates />
<VisualStates mode="light" />
</VisualRegressionWrapper>
<h4 className="utrecht-heading-3">Dark</h4>
<VisualRegressionWrapper className={`lux-theme--logius-dark`}>
<VisualStates />
<VisualStates mode="dark" />
</VisualRegressionWrapper>
</div>
));
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ const options = [
{ value: '3', label: 'Radio Option 3' },
];

export const VisualStates = () => (
export const VisualStates = ({ mode }: { mode: 'light' | 'dark' }) => (
<>
<LuxFormFieldRadioGroup name="radiogroup-default-light" label="Radio Group" options={options} />
<LuxFormFieldRadioGroup name={`radiogroup-default-${mode}`} label="Radio Group" options={options} />
<LuxFormFieldRadioGroup
name="radiogroup-descriptions-light"
name={`radiogroup-descriptions-${mode}`}
label="Radio Group"
description="Description"
options={options.map((option) =>
Object.assign({}, { ...option }, { description: `Option Description ${option.value}` }),
)}
/>
<div className="pseudo-hover-all">
<LuxFormFieldRadioGroup name="radiogroup-hover-light" label="Radio Group Hover" options={options} />
<LuxFormFieldRadioGroup name={`radiogroup-hover-${mode}`} label="Radio Group Hover" options={options} />
</div>
<div className="pseudo-focus-all pseudo-focus-visible-all">
<LuxFormFieldRadioGroup name="radiogroup-hover-light" label="Radio Group Focus" options={options} />
<LuxFormFieldRadioGroup name={`radiogroup-hover-${mode}`} label="Radio Group Focus" options={options} />
</div>
<LuxFormFieldRadioGroup
name="radiogroup-checked-light"
name={`radiogroup-checked-${mode}`}
label="Radio Group Checked"
options={options.map((option) => Object.assign({}, { ...option }, { checked: option.value === 2 }))}
options={options.map((option) => Object.assign({}, { ...option }, { checked: option.value === '2' }))}
/>
<LuxFormFieldRadioGroup
name="radiogroup-disabled-light"
name={`radiogroup-disabled-${mode}`}
label="Radio Group Disabled"
options={options.map((option) => Object.assign({}, { ...option }, { disabled: option.value === 2 }))}
options={options.map((option) => Object.assign({}, { ...option }, { disabled: option.value === '2' }))}
/>
<LuxFormFieldRadioGroup
name="radiogroup-invalid-light"
name={`radiogroup-invalid-${mode}`}
label="Radio Group Invalid"
errorMessage="Error Message"
invalid
Expand Down

0 comments on commit 834c639

Please sign in to comment.