theme/apply

  • Утилиты
  • экспортов: 3

Экспорты подпути @feugene/granularity/theme/apply с сигнатурами из его объявлений типов.

Источник: @feugene/granularity 1.1.1, package.json#exports и dist/types

На этой странице

Импорт

import { applyTheme, removeTheme } from '@feugene/granularity/theme/apply'

Экспорты

ApplyThemeOptionsinterface
interface ApplyThemeOptions

Подключение темы в рантайме — `@feugene/granularity/theme/apply`.

applyThemefunction
function applyTheme(css: string, options?: ApplyThemeOptions): () => void

Подключает CSS темы и возвращает функцию, которая его снимает.

removeThemefunction
function removeTheme(name?: string, target?: HTMLElement | null): void

Снимает тему, подключённую `applyTheme`.

Проза библиотеки

Читать в репозитории: docs/theming.md