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

Export useTheme and useThemeMode from ThemeContext #389

Closed
myabeaver opened this issue Oct 16, 2022 · 2 comments · Fixed by #390
Closed

Export useTheme and useThemeMode from ThemeContext #389

myabeaver opened this issue Oct 16, 2022 · 2 comments · Fixed by #390
Labels
needs info Further information is requested

Comments

@myabeaver
Copy link
Contributor

myabeaver commented Oct 16, 2022

Is your feature request related to a problem? Please describe.
I would like to have accessibility to the useTheme and useThemeMode, due to custom element styling.

Describe the solution you'd like
Export useTheme and useThemeMode from ThemeContext.

Describe alternatives you've considered
The current workaround is to modify the ThemeContext files on postinstall with a script.

@myabeaver myabeaver changed the title Export ThemeContext, ThemeProvider, useTheme and useThemeMode Export useTheme and useThemeMode Oct 16, 2022
@myabeaver myabeaver changed the title Export useTheme and useThemeMode Export useTheme and useThemeMode from ThemeContext Oct 16, 2022
@rluders rluders added the needs info Further information is requested label Oct 16, 2022
@rluders
Copy link
Collaborator

rluders commented Oct 16, 2022

@myasteiner Can you provide a hypothetical example of how you will use the useTheme and useThemeMode in your scenario?

What are you expecting to achieve with this? How you are going to use it? Which type of customization are you looking for?

myabeaver pushed a commit to myabeaver/flowbite-react that referenced this issue Oct 16, 2022
Exported useTheme and useThemeMode hooks from ThemeContext and updated theme docs.

fix themesberg#389
@myabeaver
Copy link
Contributor Author

myabeaver commented Oct 16, 2022

Hi @rluders , i've created a PR for it with the updated docs.

I would like to use the useTheme hook and useThemeMode hook for custom components (e. g. custom form element). Therefore i would need to know the current theme mode but also colors in each mode. I want to ensure, that my own component is styled like Flowbite's components.

rluders pushed a commit that referenced this issue Oct 16, 2022
Exported useTheme and useThemeMode hooks from ThemeContext and updated theme docs.

fix #389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants