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
@@ -19,21 +19,15 @@ A badge used to bring attention to a particular UI element or functionality.
19
19
20
20
The use of variants does not provide extra semantic meaning and is strictly visual. Ensure your content provides the necessary context for users by using the `aria-label` prop if needed.
21
21
22
-
<Canvas>
23
-
<Storyof={BadgeStories.Playground} />
24
-
</Canvas>
22
+
<Canvasof={BadgeStories.Playground} />
25
23
26
24
## Examples
27
25
28
-
<Canvas>
29
-
<Storyof={BadgeStories.MainDemo} />
30
-
</Canvas>
26
+
<Canvasof={BadgeStories.MainDemo} />
31
27
32
28
## Inside other elements
33
29
34
-
<Canvas>
35
-
<Storyof={BadgeStories.InsideOtherElements} />
36
-
</Canvas>
30
+
<Canvasof={BadgeStories.InsideOtherElements} />
37
31
38
32
## Props
39
33
@@ -70,6 +64,4 @@ Even though Reactist does not yet owns the concept of dark mode, and leaves it f
70
64
up, here's a demo on how easily you can prepare badges for dark mode by setting CSS custom
@@ -15,55 +15,43 @@ import * as BannerStories from './banner.stories'
15
15
16
16
A simple banner component meant to be used to _inform_ the user of promotional content, disclaimers, warnings, as well as success and error states.
17
17
18
-
<Canvas>
19
-
<Storyof={BannerStories.Playground} />
20
-
</Canvas>
18
+
<Canvasof={BannerStories.Playground} />
21
19
22
20
## Examples
23
21
24
22
### Icons
25
23
26
24
Banners can feature different icons or no icon at all. When the type is neutral, a custom icon can be provided; otherwise, preset icons corresponding to the respective type will be used.
27
25
28
-
<Canvas>
29
-
<Storyof={BannerStories.IconVariants} />
30
-
</Canvas>
26
+
<Canvasof={BannerStories.IconVariants} />
31
27
32
28
### Actions
33
29
34
30
Banners can have an optional dismiss action, or a primary or tertiary CTA, but never both. Additionally, banners can have an optional inline links near the description.
35
31
36
32
These actions can be combined, such as a primary CTA with a dismiss option, or a primary CTA with a dismiss option and an inline link.
37
33
38
-
<Canvas>
39
-
<Storyof={BannerStories.Actions} />
40
-
</Canvas>
34
+
<Canvasof={BannerStories.Actions} />
41
35
42
36
### Copy
43
37
44
38
Banners have two content options: a regular text that can span over multiple lines, or a bold header and a description with a secondary text color.
45
39
46
-
<Canvas>
47
-
<Storyof={BannerStories.Copy} />
48
-
</Canvas>
40
+
<Canvasof={BannerStories.Copy} />
49
41
50
42
### Image
51
43
52
44
Banners can include images placed at the top, separated from the copy by a divider. The banner adapts to the image, ensuring it fills the full width and height of the banner.
53
45
54
46
Image banners do not feature icons but can include body text or a combination of a header and description. They also support optional inline links and a dismiss action.
55
47
56
-
<Canvas>
57
-
<Storyof={BannerStories.Image} />
58
-
</Canvas>
48
+
<Canvasof={BannerStories.Image} />
59
49
60
50
### Content
61
51
62
52
Banners can include extra content.
63
53
64
-
<Canvas>
65
-
<Storyof={BannerStories.Content} />
66
-
</Canvas>
54
+
<Canvasof={BannerStories.Content} />
67
55
68
56
## Props
69
57
@@ -95,6 +83,4 @@ Even though Reactist does not yet owns the concept of dark mode, and leaves it f
95
83
up, here's a demo on how easily you can prepare banners for dark mode by setting CSS custom
If the `Loading` component is describing the loading progress of a particular region of a page, you should use the `aria-describedby` attribute to point to the status, and set the `aria-busy` attribute to `true` on the region until it is finished loading.
0 commit comments