segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

fix: Update appearance Button propType to stop warnings #1287

Closed CLSnazel closed 2 years ago

CLSnazel commented 3 years ago

Overview This branch removes the warning shown in #1236 and #1234. Giving a custom appearance value that is not the preset default, primary or minimal will no longer cause a warning in the browser. This is helpful for those who intend to apply themes of their own and would like to name button appearances without browser warnings.

The Button prop types have been set to string instead of oneOf the preset values for the default theme.

Screenshots (if applicable) In storybook, a button appearance of destructive is applied to buttons in the Button types story. It results in this warning in the console: destructive-warning With this branch, warnings like this will not appear.

Documentation

netlify[bot] commented 3 years ago

✔️ Deploy Preview for evergreen-storybook ready!

🔨 Explore the source changes: 16bad080348ee8cdab5a4c778d207ada5852b2c3

🔍 Inspect the deploy log: https://app.netlify.com/sites/evergreen-storybook/deploys/619d6557c4b7000007935673

😎 Browse the preview: https://deploy-preview-1287--evergreen-storybook.netlify.app