agroptima-design-system 0.26.0-beta.1 → 0.26.0-beta.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/package.json
CHANGED
package/src/atoms/Badge.scss
CHANGED
package/src/atoms/Badge.tsx
CHANGED
|
@@ -13,8 +13,9 @@ export type Variant =
|
|
|
13
13
|
|
|
14
14
|
export interface BadgeProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
15
15
|
variant?: Variant
|
|
16
|
-
text
|
|
16
|
+
text?: string
|
|
17
17
|
accessibilityLabel: string
|
|
18
|
+
isDot?: boolean
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export function Badge({
|
|
@@ -22,9 +23,10 @@ export function Badge({
|
|
|
22
23
|
className,
|
|
23
24
|
text,
|
|
24
25
|
accessibilityLabel,
|
|
26
|
+
isDot,
|
|
25
27
|
...props
|
|
26
28
|
}: BadgeProps): React.JSX.Element {
|
|
27
|
-
const cssClasses = classNames('badge', variant, className)
|
|
29
|
+
const cssClasses = classNames('badge', variant, className, { dot: isDot })
|
|
28
30
|
|
|
29
31
|
return (
|
|
30
32
|
<span
|
|
@@ -54,3 +54,12 @@ export const BadgeWithNumbers: Story = {
|
|
|
54
54
|
},
|
|
55
55
|
parameters: figmaPrimaryDesign,
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
export const BadgeWithDot: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
variant: 'success',
|
|
61
|
+
isDot: true,
|
|
62
|
+
accessibilityLabel: 'There are items enabled',
|
|
63
|
+
},
|
|
64
|
+
parameters: figmaPrimaryDesign,
|
|
65
|
+
}
|