@@ -49,10 +49,42 @@ communicate calls to action to the user and allow users to interact with pages
4949in a variety of ways. ` Button ` labels express what action will occur when the
5050user interacts with it.
5151
52- <Canvas of = { ButtonStories .Default } />
53- <Canvas of = { ButtonStories .Secondary } />
54- <Canvas of = { ButtonStories .Tertiary } />
55- <Canvas of = { ButtonStories .Ghost } />
52+ <Canvas
53+ of = { ButtonStories .Default }
54+ additionalActions = { [
55+ {
56+ title: ' Open in Stackblitz' ,
57+ onClick : () => stackblitzPrefillConfig (ButtonStories .Default ),
58+ },
59+ ]}
60+ />
61+ <Canvas
62+ of = { ButtonStories .Secondary }
63+ additionalActions = { [
64+ {
65+ title: ' Open in Stackblitz' ,
66+ onClick : () => stackblitzPrefillConfig (ButtonStories .Secondary ),
67+ },
68+ ]}
69+ />
70+ <Canvas
71+ of = { ButtonStories .Tertiary }
72+ additionalActions = { [
73+ {
74+ title: ' Open in Stackblitz' ,
75+ onClick : () => stackblitzPrefillConfig (ButtonStories .Tertiary ),
76+ },
77+ ]}
78+ />
79+ <Canvas
80+ of = { ButtonStories .Ghost }
81+ additionalActions = { [
82+ {
83+ title: ' Open in Stackblitz' ,
84+ onClick : () => stackblitzPrefillConfig (ButtonStories .Ghost ),
85+ },
86+ ]}
87+ />
5688
5789## Danger Buttons
5890
@@ -64,7 +96,15 @@ danger button style. However, if a destructive action is just one of several
6496actions a user could choose from, then a lower emphasis style like the tertiary
6597danger button or the ghost danger button may be more appropriate.
6698
67- <Canvas of = { ButtonStories .Danger } />
99+ <Canvas
100+ of = { ButtonStories .Danger }
101+ additionalActions = { [
102+ {
103+ title: ' Open in Stackblitz' ,
104+ onClick : () => stackblitzPrefillConfig (ButtonStories .Danger ),
105+ },
106+ ]}
107+ />
68108
69109## Icon-only Buttons
70110
@@ -73,7 +113,15 @@ Icon buttons can take the form of Primary, Secondary, Tertiary, and Ghost but
73113most commonly will be styled as primary or ghost buttons. Icon only buttons do
74114not support Danger, Danger tertiary, or Danger ghost.
75115
76- <Canvas of = { ButtonStories .IconButton } />
116+ <Canvas
117+ of = { ButtonStories .IconButton }
118+ additionalActions = { [
119+ {
120+ title: ' Open in Stackblitz' ,
121+ onClick : () => stackblitzPrefillConfig (ButtonStories .IconButton ),
122+ },
123+ ]}
124+ />
77125
78126## Set of Buttons
79127
@@ -84,15 +132,31 @@ Negative action buttons will be on the left. Positive action buttons should be
84132on the right. When these two types buttons are paired in the correct order, they
85133will automatically space themselves apart.
86134
87- <Canvas of = { ButtonStories .SetOfButtons } />
135+ <Canvas
136+ of = { ButtonStories .SetOfButtons }
137+ additionalActions = { [
138+ {
139+ title: ' Open in Stackblitz' ,
140+ onClick : () => stackblitzPrefillConfig (ButtonStories .SetOfButtons ),
141+ },
142+ ]}
143+ />
88144
89145## Skeleton state
90146
91147You can use the ` ButtonSkeleton ` component to render a skeleton variant of a
92148button. This is useful to display on initial page load to indicate to users that
93149content is being loaded.
94150
95- <Canvas of = { ButtonStories .Skeleton } />
151+ <Canvas
152+ of = { ButtonStories .Skeleton }
153+ additionalActions = { [
154+ {
155+ title: ' Open in Stackblitz' ,
156+ onClick : () => stackblitzPrefillConfig (ButtonStories .Skeleton ),
157+ },
158+ ]}
159+ />
96160
97161## Component API
98162
0 commit comments