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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.26.0-beta.1",
3
+ "version": "0.26.0-beta.2",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -15,6 +15,12 @@
15
15
 
16
16
  @include typography.footnote-primary;
17
17
 
18
+ &.dot {
19
+ width: 6px;
20
+ height: 6px;
21
+ padding: 0;
22
+ }
23
+
18
24
  &.info {
19
25
  background: color_alias.$info-color-600;
20
26
  color: color_alias.$neutral-white;
@@ -13,8 +13,9 @@ export type Variant =
13
13
 
14
14
  export interface BadgeProps extends React.ComponentPropsWithoutRef<'span'> {
15
15
  variant?: Variant
16
- text: string
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
+ }
@@ -8,6 +8,7 @@ import { Meta } from "@storybook/blocks";
8
8
 
9
9
  * Add CheckableTag & CheckableTagGroup components.
10
10
  * Add Filter icon.
11
+ * Add Dot option to Badge component.
11
12
 
12
13
  # 0.25.5
13
14