@x-edu/theme

1.0.11 • Public • Published

@x-edu/theme

设计案

多租户域名获取方案

demo

目前内置 dark light 两套主题变量

设置主题

import {
  removeTheme,
  setTheme
} from '../src'

// 为根级元素 #app 添加class dark
setTheme('#app', 'dark')
// 移除主题
removeTheme('#app', 'dark')
// 单参数则设置 class于 body 元素上
setTheme('dark')
removeTheme('dark')

读取主题变量

@import '@x-edu/theme/dist/theme/dark.less';
import darkThemeVariable from '@x-edu/theme/dist/theme/dark'

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.11
    1
    • latest

Version History

Package Sidebar

Install

npm i @x-edu/theme

Weekly Downloads

1

Version

1.0.11

License

none

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • huhb500
  • eliseisgood
  • dont_write_code
  • guoyh
  • caijiexuan
  • janya
  • githoniel
  • gylllll
  • caolvchong