next-style 1.1.0 → 1.1.1
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 +5 -8
- package/dist/index.jsx +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,13 +25,13 @@ NextStyle focuses on **runtime flexibility**, **type safety**, and **minimal abs
|
|
|
25
25
|
Install the package along with its peer dependencies:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npm install
|
|
28
|
+
npm install next-style postcss autoprefixer react
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
or with Bun:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
bun add
|
|
34
|
+
bun add next-style postcss autoprefixer react
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -39,9 +39,9 @@ bun add zed-style postcss autoprefixer react
|
|
|
39
39
|
## Basic Usage
|
|
40
40
|
|
|
41
41
|
```tsx
|
|
42
|
-
import { NextStyle } from "
|
|
42
|
+
import { NextStyle } from "next-style"
|
|
43
43
|
|
|
44
|
-
const style = new NextStyle()
|
|
44
|
+
const style = new NextStyle('home') // output className = home_{hash} default "next_{hash}"
|
|
45
45
|
|
|
46
46
|
const className = style.css({
|
|
47
47
|
display: "flex",
|
|
@@ -49,11 +49,9 @@ const className = style.css({
|
|
|
49
49
|
padding: "12px",
|
|
50
50
|
backgroundColor: "#111",
|
|
51
51
|
color: "white",
|
|
52
|
-
|
|
53
52
|
_hover: {
|
|
54
53
|
backgroundColor: "#222"
|
|
55
54
|
},
|
|
56
|
-
|
|
57
55
|
_md: {
|
|
58
56
|
padding: "16px"
|
|
59
57
|
}
|
|
@@ -69,7 +67,6 @@ export default function App() {
|
|
|
69
67
|
<div className={className}>
|
|
70
68
|
Hello NextStyle
|
|
71
69
|
</div>
|
|
72
|
-
|
|
73
70
|
<style.Provider />
|
|
74
71
|
</>
|
|
75
72
|
)
|
|
@@ -167,7 +164,7 @@ Important notes:
|
|
|
167
164
|
Class names are generated using a deterministic hash based on the style object:
|
|
168
165
|
|
|
169
166
|
```text
|
|
170
|
-
|
|
167
|
+
next_x9k3a2m1
|
|
171
168
|
```
|
|
172
169
|
|
|
173
170
|
This ensures:
|
package/dist/index.jsx
CHANGED
package/package.json
CHANGED