@viewfly/scoped-css 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -34
- package/bundles/css-modules.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,37 +3,4 @@ Viewfly
|
|
|
3
3
|
|
|
4
4
|
Viewfly 是一个简单、数据驱动的前端框架。此项目为 Viewfly 组件提供了 css 模块化的能力。
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## 安装
|
|
9
|
-
```
|
|
10
|
-
npm install @viewfly/scoped-css
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## API
|
|
14
|
-
|
|
15
|
-
### scopedCSS()
|
|
16
|
-
|
|
17
|
-
```css
|
|
18
|
-
/* app.module.css */
|
|
19
|
-
.app {
|
|
20
|
-
color: blue
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
```jsx
|
|
25
|
-
import { scopedCSS } from '@viewfly/scoped-css'
|
|
26
|
-
|
|
27
|
-
import css from './app.module.css'
|
|
28
|
-
|
|
29
|
-
const App = scopedCSS(css, () => {
|
|
30
|
-
return () => {
|
|
31
|
-
return <div css="app">App</div>
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
scopedCSS 通过会识别标签的 css 属性,并替换为模拟化的 css class 类名。css 不仅可以支持字符串,还可以支持对象、数组、或数组内对象的组合。
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
完整文档请参考官方网站:[viewfly.org](https://viewfly.org)
|
|
6
|
+
文档请参考官方网站:[https://viewfly.org/guide/scoped-css](https://viewfly.org/guide/scoped-css)
|
package/bundles/css-modules.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JSXInternal } from '@viewfly/core';
|
|
2
|
-
export declare function withScopedCSS(cssNamespace: string | string[], render: () => JSXInternal.Element): () => JSXInternal.
|
|
2
|
+
export declare function withScopedCSS(cssNamespace: string | string[], render: () => JSXInternal.Element): () => JSXInternal.JSXNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/scoped-css",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "A library for supporting scoped style sheets in the Viewfly framework。",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@viewfly/core": "^0.0.
|
|
15
|
+
"@viewfly/core": "^0.0.19"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@rollup/plugin-commonjs": "^25.0.3",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "9276451814bcda728846876797e327d297a31b0e"
|
|
36
36
|
}
|