Skip to content
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

Initial integration of light dark toggle using themeprovider #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mzkrasner
Copy link

  • Integrates a light-dark toggle component into navigation (header)
  • Integrates a theme provider to wrap the layout and provide theme state across child components
  • Edits to destructive color to appear lighter when in dark mode
  • Stores system preference in local storage

Copy link
Collaborator

@kenny-io kenny-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this wonderful PR @mzkrasner

Just a little update needed. The NO_DATA status color is invisible across both dark and light mode.

At the moment, it looks like this (NO_DATA status color is invisible):

image

It should look like this:

image

To fix this, you could update the STATUS_COLORS in lib/constants to

  export const STATUS_COLORS = {
    [STATUS.NO_DATA]: 'bg-muted', 
    [STATUS.DOWN]: 'bg-red-500',
    [STATUS.UP]: 'bg-green-500',
    [STATUS.PARTIAL]: 'bg-orange-500',
  } as const;

The bg-muted class will automatically adapt to the theme since it's defined in the CSS variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants