-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(toolbar): Allow every element to have every color #10186
Conversation
🦋 Changeset detectedLatest commit: 86e84f4 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
⚖️ Bundle Size CheckLatest commit: d241e03
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I worry about users accidentally passing incorrect attribute values, then losing the element because everything is invisible, so validation would be nice to have, but maybe not that critical.
Also, we have a blue
palette if you want to expose that option too! Base is #3645D9
, light is #BDC3FF
, and dark is #0B1466
.
packages/astro/src/runtime/client/dev-toolbar/ui-library/badge.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs approves!
Changes
Previously only a few elements could have different colors, buttons and badges. This PR makes it so every element can be customized in the same fashion. Additionally, it is now fully reactive, so you can change it at runtime however you want.
A notable exception however is Tooltip, because that one doesn't use standard colors and need a bit more design work.
(the card in this screenshot are all hovered, their neutral state has no colors.)
Testing
We don't really test the precise style of everything at this time, nonetheless everything should be clickable and everything like before, so tests should pass!
Docs
withastro/docs#7191