newscorp-ghfb / NewsKit

The NewsKit Design system
https://newskit.co.uk
Other
130 stars 14 forks source link

Update Switch component scenarios - Storybook #739

Closed jps closed 1 year ago

jps commented 1 year ago

Description

Updates to the Switch component scenarios- Storybook

Tasks/Steps

Notes (main differences to what we have currently live versus the designs)

Acceptance/Testing Criteria

Given I am in Storybook

When I view the Switch component pages

Then the pages will be updated as per the designs

And the pages will be within 1024x768 for Applitools snapshots.

Business Benefit/Value

Consistent Switch examples for consumers, aligning to the NK branding.

Supporting Information

Designs: NewsKit - Storybook Project - Feedback and Status

Dependencies

N/A

Review with design when ready.

mstuartf commented 1 year ago

@nathanparris @GeriReid

A few differences with the designs / questions:

  1. By default, the switch has no icons. So I've only included icons in the icons stories and I've skipped Icon component overridden in the overrides scenario.
  2. Start and end label alignment are the other way around.
  3. What styling should I apply for the feedback and track in base state for the Styling overrides scenario?

http://ncu-newskit-docs-pr.s3-website-eu-west-1.amazonaws.com/739-switch-scenarios/storybook/?path=/docs/components-switch--story-switch-default

nathanparris commented 1 year ago

@mstuartf The labels for Base, Small, Medium… etc are very small. They be like they appear on the Button component https://storybook.newskit.co.uk/?path=/story/components-button--story-button-primary

GeriReid commented 1 year ago

Hey @mstuartf, thanks for the update

  1. Makes sense removing the icons if not default
  2. Good catch on the start/end
  3. Styling overrides: track colour works in both light and dark. For the feedback on hover, can you try 20% storybook-overides inkBrand (it's light: amber070 dark: amber020). Should work on dark and light.
mstuartf commented 1 year ago

Thanks. Updates pushed.

GeriReid commented 1 year ago

Thanks for the changes @mstuartf, you can move this one to review.