Skip to content

Commit

Permalink
Improve data attributes typing using template literal types
Browse files Browse the repository at this point in the history
  • Loading branch information
pacocoursey committed Mar 13, 2024
1 parent 9fc37ca commit 83ad33a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion next-themes/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface ThemeProviderProps {
/** Default theme name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default theme is light */
defaultTheme?: string | undefined
/** HTML attribute modified based on the active theme. Accepts `class` and `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.) */
attribute?: string | 'class' | undefined
attribute?: `data-${string}` | 'class' | undefined
/** Mapping of theme name to HTML attribute value. Object where key is the theme name and value is the attribute value */
value?: ValueObject | undefined
/** Nonce string to pass to the inline script for CSP headers */
Expand Down

0 comments on commit 83ad33a

Please sign in to comment.