MetaMask / design-tokens

Design tokens to be used throughout MetaMask products
https://metamask.github.io/design-tokens/?path=/docs/getting-started-introduction--docs
27 stars 15 forks source link

chore: updating package.json css path #622

Closed georgewrmarshall closed 7 months ago

georgewrmarshall commented 7 months ago

Description

This PR addresses an issue where the CSS stylesheet exports were not functioning correctly due to a misconfiguration in the package.json file. Specifically, the files field in package.json was not correctly configured to include the CSS file, causing the exports to fail. The previous failed attempts were because I was testing using npm pack instead of yarn pack which render different results.

After this update we should be able to import the style sheet like

import '@metamask/design-tokens/design-tokens.css'

or

import '../../node_modules/@metamask/design-tokens/src/css/design-tokens';

Related issues

Fixes: #608 Attempted previous fixes:

Screenshots/Recordings

Before

https://github.com/MetaMask/design-tokens/assets/8112138/593a791f-096d-45b7-8b82-77505d3597fc

After

https://github.com/MetaMask/design-tokens/assets/8112138/fd314eb6-70aa-41f4-b326-b8ec7e4bdf54

Manual testing steps

Pre-merge author checklist

Pre-merge reviewer checklist

metamaskbot commented 7 months ago

Builds ready [e0df49d]

Storybook: Storybook

metamaskbot commented 7 months ago

Builds ready [7e0a75e]

Storybook: Storybook