carbon icon indicating copy to clipboard operation
carbon copied to clipboard

feat(switch): enhances Switch component to allow inline variant in new validation redesign

Open damienrobson-sage opened this issue 4 months ago • 0 comments

Proposed behaviour

Adds the following enhancements to the Switch component:

  • Inline error style with the new error
  • Dark background variant

This will allow the inline option to work alongside the validationRedesignOptIn flag. If the inline layout does not fit the space provided, it will default to the vertical style layout.

Current behaviour

The Switch component does not currently support inline layouts if the validationRedesignOptIn flag is set to true

Checklist

  • [x] Commits follow our style guide
  • [ ] Related issues linked in commit messages if required
  • [ ] Screenshots are included in the PR if useful
  • [x] All themes are supported if required
  • [x] Unit tests added or updated if required
  • [x] Playwright automation tests added or updated if required
  • [x] Storybook added or updated if required
  • [ ] Translations added or updated (including creating or amending translation keys table in storybook) if required
  • [ ] Typescript d.ts file added or updated if required
  • [x] Related docs have been updated if required

QA

  • [ ] Tested in provided StackBlitz sandbox/Storybook
  • [ ] Add new Playwright test coverage if required
  • [ ] Carbon implementation matches Design System/designs
  • [ ] UI Tests GitHub check reviewed if required

Additional context

Testing instructions

damienrobson-sage avatar Oct 17 '24 10:10 damienrobson-sage