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
* default font-type-20 + update padding
* add Pill with link
* add PILL_COLORS constant
* remove Large pill variant
* update documentation
* update snapshots
* fix Pill prop issue in failing test
* update Pill to accept children, adjust props
* keep text and children props for backwards compatibility
* update docs
* update to use FontAwesome for close icon + blue color update
Represents an object that can be viewed with or without an icon
5
+
Represents an object that can be viewed with or without an icon. Useful when describing or categorizing a property.
6
6
7
7
<Preview>
8
8
<Storyid="design-system-pill--default" />
@@ -12,17 +12,24 @@ Represents an object that can be viewed with or without an icon
12
12
13
13
## Anatomy
14
14
15
-
-**Text: ** main descriptor of the pill
16
-
-**Icon: ** relevant icon that makes it easier for users to identify (always placed left of the Text)
15
+
-**Content: ** main content area of the Pill. Can be provided plain text or a link (`<a>`) as `children`
16
+
-**Icon: ** relevant icon that makes it easier for users to identify (always placed left of the Content)
17
17
-**Close: ** users have the option to clear the pill (provided by default with the presence of the `onClose` function)
18
18
19
19
## Best practices
20
20
21
-
- TBD
21
+
- Use to label, categorize, or organize items using keywords that describe them
22
+
- Help users search for and find related content quickly and easily
23
+
- Use to highlight an item's status for quick recognition
24
+
- Ideal to indicate meanings that users can learn and recognize across the app
22
25
23
26
## Stories
24
27
25
28
### Default
29
+
- The default Pill and available colors
30
+
- Use the `PILL_COLORS` constant when setting the `color` prop
31
+
- Can use either the `text` prop or provide an element via `children` for content. (Note: the `text` prop is planned to be retired in favor of `children` in a future release)
32
+
- If using plain text or an element as the content via `children`, do not wrap in block-level elements (e.g. `<p>` or `div`)
26
33
27
34
<Preview>
28
35
<Storyid="design-system-pill--default" />
@@ -41,3 +48,11 @@ Represents an object that can be viewed with or without an icon
0 commit comments