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

dark mode not working? #4837

Closed
4 tasks done
booboothefool opened this issue Dec 12, 2023 · 2 comments
Closed
4 tasks done

dark mode not working? #4837

booboothefool opened this issue Dec 12, 2023 · 2 comments
Labels
Theming An issue or a feature-request for UI Theming

Comments

@booboothefool
Copy link

booboothefool commented Dec 12, 2023

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Authenticator, Storage (Storage Manager)

How is your app built?

next.js

What browsers are you seeing the problem on?

Chrome

Which region are you seeing the problem in?

us-west-1

Please describe your bug.

I am expecting this to enable dark mode but it is still white. Are there steps I am missing?

    <ThemeProvider colorMode="dark">
      <Card>
        <Button>Hello</Button>
        <Text variation="primary">Primary text</Text>
        <Text variation="secondary">Secondary text</Text>
        <Text variation="tertiary">Tertiary text</Text>
      </Card>
    </ThemeProvider>

What's the expected behaviour?

Expect components to be dark instead of white.

Help us reproduce the bug!

I cannot get any component to use dark mode.

Code Snippet

No response

Console log output

No response

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Dec 12, 2023
@ioanabrooks
Copy link
Contributor

Hi @booboothefool, are you passing a dark theme override to the ThemeProvider? Amplify UI has one that you can use, see an example here.

@ioanabrooks ioanabrooks added pending-response Theming An issue or a feature-request for UI Theming and removed pending-triage Issue is pending triage labels Dec 12, 2023
@booboothefool
Copy link
Author

Hi @booboothefool, are you passing a dark theme override to the ThemeProvider? Amplify UI has one that you can use, see an example here.

Oh, I didn't realize I needed overrides: [defaultDarkModeOverride] because I was already specifying colorMode="dark". That worked, thank you!

<ThemeProvider
  theme={{
    name: 'my-theme',
    overrides: [defaultDarkModeOverride]
  }}
  colorMode="dark"
>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Theming An issue or a feature-request for UI Theming
Projects
None yet
Development

No branches or pull requests

2 participants