You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/components/badge/badge.mdx
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -12,36 +12,40 @@ Styled badge component with multiple flavours depending on use case.
12
12
13
13
## Default Usage
14
14
15
-
A button with no additional props / classes applied
15
+
A badge with no additional props / classes applied
16
16
17
17
<Canvasof={BadgeStories.Default} />
18
18
19
19
<RenderHtmlMarkupof={BadgeStories.Default} />
20
20
21
21
## Badge Reversed
22
22
23
+
In order to reverse a badge you will just need to provide a prop called `isReversed`. If you have icon left and icon right with the badge it will be reversed as well.
A badge without label can be used when not enogh space is available. It should always include a tooltip on hover to provide more context for the icon meaning.
37
+
A badge can be with just an icon for accessibility you will need to add an `aria-label` with it. It should be wrapped with a tooltip component to provide more context for the icon meaning.
0 commit comments