windctrl 0.1.0 → 0.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 +3 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,14 +136,14 @@ const button = windctrl({
|
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
// Usage
|
|
139
|
-
// 1. Wrap the parent with `data-scope` and `group/
|
|
139
|
+
// 1. Wrap the parent with `data-windctrl-scope` and `group/windctrl-scope`
|
|
140
140
|
// 2. The button automatically adapts its style based on the parent
|
|
141
|
-
<div data-scope="header" className="group/
|
|
141
|
+
<div data-windctrl-scope="header" className="group/windctrl-scope">
|
|
142
142
|
<button className={button().className}>Header Button</button>
|
|
143
143
|
</div>
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
The scope classes are automatically prefixed with `group-data-[scope=...]/
|
|
146
|
+
The scope classes are automatically prefixed with `group-data-[windctrl-scope=...]/windctrl-scope:` to target the parent's data attribute.
|
|
147
147
|
|
|
148
148
|
### Variants
|
|
149
149
|
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ function processScopes(scopes) {
|
|
|
49
49
|
return classesStr
|
|
50
50
|
.split(/\s+/)
|
|
51
51
|
.filter(Boolean)
|
|
52
|
-
.map((cls) => `group-data-[scope=${scopeName}]/
|
|
52
|
+
.map((cls) => `group-data-[windctrl-scope=${scopeName}]/windctrl-scope:${cls}`)
|
|
53
53
|
.join(" ");
|
|
54
54
|
});
|
|
55
55
|
}
|
package/package.json
CHANGED