@asnewyla/button-group 0.1.0 → 0.1.2
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 +28 -28
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# @asnewyla/button-group
|
|
2
|
-
|
|
3
|
-
Groups `@asnewyla/button` components visually (`role="group"`) and propagates
|
|
4
|
-
`variant`, `size`, and `disabled` to every child via context. Any child can
|
|
5
|
-
override an individual prop.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @asnewyla/button-group
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { Button } from '@asnewyla/button';
|
|
17
|
-
import { ButtonGroup } from '@asnewyla/button-group';
|
|
18
|
-
|
|
19
|
-
<ButtonGroup variant="secondary" aria-label="Text alignment">
|
|
20
|
-
<Button>Left</Button>
|
|
21
|
-
<Button>Center</Button>
|
|
22
|
-
<Button variant="destructive">Right</Button> {/* overrides the group */}
|
|
23
|
-
</ButtonGroup>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## License
|
|
27
|
-
|
|
28
|
-
MIT
|
|
1
|
+
# @asnewyla/button-group
|
|
2
|
+
|
|
3
|
+
Groups `@asnewyla/button` components visually (`role="group"`) and propagates
|
|
4
|
+
`variant`, `size`, and `disabled` to every child via context. Any child can
|
|
5
|
+
override an individual prop.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @asnewyla/button-group
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button } from '@asnewyla/button';
|
|
17
|
+
import { ButtonGroup } from '@asnewyla/button-group';
|
|
18
|
+
|
|
19
|
+
<ButtonGroup variant="secondary" aria-label="Text alignment">
|
|
20
|
+
<Button>Left</Button>
|
|
21
|
+
<Button>Center</Button>
|
|
22
|
+
<Button variant="destructive">Right</Button> {/* overrides the group */}
|
|
23
|
+
</ButtonGroup>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asnewyla/button-group",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Groups buttons visually and propagates shared props via context",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
19
20
|
"import": "./dist/index.mjs",
|
|
20
|
-
"require": "./dist/index.js"
|
|
21
|
-
"types": "./dist/index.d.ts"
|
|
21
|
+
"require": "./dist/index.js"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@asnewyla/button": "0.1
|
|
39
|
+
"@asnewyla/button": "0.2.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"react": "^18.3.0",
|