@purpurds/badge 5.4.2 → 5.4.3

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/dist/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  Name: @purpurds/icon
2
- Version: 5.4.1
2
+ Version: 5.4.2
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/badge",
3
- "version": "5.4.2",
3
+ "version": "5.4.3",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/badge.cjs.js",
6
6
  "types": "./dist/badge.d.ts",
@@ -15,8 +15,8 @@
15
15
  "source": "src/badge.tsx",
16
16
  "dependencies": {
17
17
  "classnames": "~2.5.0",
18
- "@purpurds/icon": "5.4.2",
19
- "@purpurds/tokens": "5.4.2"
18
+ "@purpurds/icon": "5.4.3",
19
+ "@purpurds/tokens": "5.4.3"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@rushstack/eslint-patch": "~1.10.0",
package/readme.mdx CHANGED
@@ -23,22 +23,35 @@ import packageInfo from "./package.json";
23
23
 
24
24
  Add the dependency to your consumer app like `"@purpurds/purpur": "^x.y.z"`
25
25
 
26
+ ### Usage
27
+
26
28
  In MyApp.tsx
27
29
 
28
30
  ```tsx
29
31
  import "@purpurds/purpur/styles";
30
32
  ```
31
33
 
34
+ ## Standard
35
+
32
36
  In MyComponent.tsx
33
37
 
34
38
  ```tsx
35
39
  import { Badge } from "@purpurds/purpur";
36
40
 
37
- export const MyComponent = () => {
38
- return (
39
- <div>
40
- <Badge {...someProps}>Some content</Badge>
41
- </div>
42
- );
43
- };
41
+ export const MyComponent = () => <Badge variant="success">Great success 👌</Badge>;
42
+ ```
43
+
44
+ ## With custom icon
45
+
46
+ In MyComponent.tsx
47
+
48
+ ```tsx
49
+ import { Badge, IconSmileyHappy } from "@purpurds/purpur";
50
+
51
+ export const MyComponent = () => (
52
+ <Badge variant="success" showIcon={false}>
53
+ <IconSmileyHappy size="xs" />
54
+ Great success 👌
55
+ </Badge>
56
+ );
44
57
  ```