Merged
Conversation
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for dark mode 🥵🥵
Inspired from chakra-ui and xstyled.dev.
It allows for example to use some hooks to set a value depending on the color mode, and add a new props in
KleeProvidernameddefaultColorModewhich can either belight | dark. It also add the beginning of styling some components (Menu, Popover or Tabs for exemple) in the theme, via their dedicated objects, to allow easy overriding between light and dark modes, but also it means that anyone canextendThemeand set their own colorExample
When providing the
appThemeto theKleeProviderit will automatically apply those colors on the Menu component and it will react to the color scheme changes.More informations here: https://styled-system.com/guides/color-modes/
A lot of utility hooks have been introduced, à la xstyled.dev, you can find them in
src/hooks/theme.ts.For now, it does not provide a way to save in localstorage / cookies the preference nor use the media prefers color scheme. Maybe it will be implemented later, but for now it covers a use case that I had in one of my application, so for now I only need to set if I want to the library to be in dark mode or in light mode once.
Storybook
The storybook now introduces a dark mode toggler to test the various components in their light / dark modes.