Skip to content

Commit

Permalink
[docs] Follow types description convention
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 22, 2024
1 parent ca63707 commit a74a03e
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,44 @@ export const DEFAULT_ATTRIBUTE = 'data-color-scheme';

export interface InitColorSchemeScriptProps {
/**
* The default mode when the storage is empty (user's first visit)
* The default mode when the storage is empty (user's first visit).
* @default 'system'
*/
defaultMode?: 'system' | 'light' | 'dark';
/**
* The default color scheme to be used on the light mode
* The default color scheme to be used on the light mode.
* @default 'light'
*/
defaultLightColorScheme?: string;
/**
* The default color scheme to be used on the dark mode
* The default color scheme to be used on the dark mode.
* * @default 'dark'
*/
defaultDarkColorScheme?: string;
/**
* The node (provided as string) used to attach the color-scheme attribute
* The node (provided as string) used to attach the color-scheme attribute.
* @default 'document.documentElement'
*/
colorSchemeNode?: string;
/**
* localStorage key used to store `mode`
* localStorage key used to store `mode`.
* @default 'mode'
*/
modeStorageKey?: string;
/**
* localStorage key used to store `colorScheme`
* localStorage key used to store `colorScheme`.
* @default 'color-scheme'
*/
colorSchemeStorageKey?: string;
/**
* DOM attribute for applying color scheme
* DOM attribute for applying color scheme.
* @default 'data-color-scheme'
*
* @example '.mode-%s' // for class based color scheme
* @example '[data-mode-%s]' // for data-attribute without '='
*/
attribute?: 'class' | 'data' | string;
/**
* Nonce string to pass to the inline script for CSP headers
* Nonce string to pass to the inline script for CSP headers.
*/
nonce?: string | undefined;
}
Expand Down

0 comments on commit a74a03e

Please sign in to comment.