MetaMask / metamask-design-system

2 stars 1 forks source link

feat: adding shadow to tailwind preset #58

Closed georgewrmarshall closed 3 weeks ago

georgewrmarshall commented 1 month ago

Description

This pull request adds new shadow tokens to the design-system-tailwind-preset package. The shadow tokens are derived from the design token CSS variables, and include both color and size definitions. These tokens will generate Tailwind utility classes that ensure consistent shadow styles across components. The shadow configuration has been imported into the index preset for global use.

Related issues

Fixes: https://github.com/MetaMask/metamask-design-system/issues/57

Manual testing steps

  1. Run yarn build && yarn to build and install the local version of the tailwind preset in storybook-react
  2. Run storybook using yarn storybook
  3. See the shadows stories
  4. Apply shadow utility classes (shadow-default, shadow-primary, shadow-error, etc.) to verify color.
  5. Apply shadow size classes (shadow-xs, shadow-sm, shadow-md, shadow-lg) to check correct shadow sizing.
  6. Verify that the shadows match the design tokens for both size and color.

Screenshots/Recordings

Before

N/A (no shadow utilities available)

After

https://github.com/user-attachments/assets/14f0eb19-2a59-4234-89af-f0b8c97949b4

Testing in Portfolio using yarn link

https://github.com/user-attachments/assets/76b6e554-13b4-40b1-83f0-6f540c827fb2

Pre-merge author checklist

Pre-merge reviewer checklist