Skip to content

Commit 1b6d214

Browse files
committed
chore: fix lint error
1 parent fe43ca6 commit 1b6d214

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This preset will help you easily make dynamic theme switching. Inspired by [here
1010
npm i -D unocss-preset-theme
1111
```
1212

13-
1413
## Usages
1514

1615
Usually you just need to set your `light theme` to `unocss` and your `dark theme` to `presetTheme`. This preset will transform your provide theme into css variables, then you just need to set the `dark` class or `compact` class (Depends on your theme name) in your html and you're done.
@@ -82,7 +81,6 @@ Your different theme. like `{ dark: {}, other: {} }`
8281

8382
Customize the selectors of the generated css variables `{ light: ':root', [themeName]: '.[themeName]' }`
8483

85-
8684
## Examples
8785

8886
- [playground](./playground/)

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function presetTheme<T extends Record<string, any>>(options: PresetThemeO
152152
return {
153153
matcher,
154154
selector(input) {
155-
const themeName = input.match(/\:([\w-]+)\\\:\d+/)![1]
155+
const themeName = input.match(/:([\w-]+)\\:\d+/)![1]
156156
return selectors[themeName] || `.${themeName}`
157157
},
158158
}

0 commit comments

Comments
 (0)