@atlaskit/tokens
Version:
Design tokens are the single source of truth to name and store design decisions.
19 lines (18 loc) • 1.29 kB
TypeScript
import { type ThemeState } from './theme-config';
/**
* Server-side rendering utility. Generates the valid HTML attributes for a given theme.
* Note: this utility does not handle automatic theme switching.
*
* @param {Object<string, string>} themeOptions - Theme options object
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
* @param {string} themeState.motion The motion theme to be applied.
* @param {string} themeState.spacing The spacing theme to be applied.
* @param {string} themeState.typography The typography theme to be applied.
* @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation
*
* @returns {Object} Object of HTML attributes to be applied to the document root
*/
declare const getThemeHtmlAttrs: ({ colorMode, dark, light, contrastMode, motion, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>) => Record<string, string>;
export default getThemeHtmlAttrs;