/
index.ts
33 lines (26 loc) · 914 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import type { Preset } from '@unocss/core'
import type { PresetMiniOptions, Theme } from '@unocss/preset-mini'
import { preflights } from '@unocss/preset-mini'
import { rules } from './rules'
import { shortcuts } from './shortcuts'
import { theme } from './theme'
import { variants } from './variants'
export { colors, preflights } from '@unocss/preset-mini'
export type { Theme } from '@unocss/preset-mini'
export { rules, shortcuts, theme, variants }
export interface PresetWindOptions extends PresetMiniOptions { }
export const presetWind = (options: PresetWindOptions = {}): Preset<Theme> => {
options.dark = options.dark ?? 'class'
options.attributifyPseudo = options.attributifyPseudo ?? false
return {
name: '@unocss/preset-wind',
theme,
rules,
shortcuts,
variants: variants(options),
options,
preflights,
prefix: options.prefix,
}
}
export default presetWind