Перейти к основному содержимому

documentTheme()

function documentTheme(options): ThemeTarget | null;

Defined in: packages/reformer/src/theme/adapters.ts:155

Применять тему к корню документа тем же маркером, что читают стили @reformer/ui-kit.

Parameters​

options​

DocumentThemeOptions = {}

См. DocumentThemeOptions.

Returns​

ThemeTarget | null

Цель темы или null без document (сервер).

Example​

// Docusaurus и сайты на data-theme:
createTheme({ target: documentTheme({ attribute: 'data-theme' }) });