@@ -14,7 +14,9 @@ resources:
14
14
15
15
import {Alert } from ' sentry/components/core/alert' ;
16
16
import {AlertLink } from ' sentry/components/core/alert/alertLink' ;
17
+ import {Badge } from ' sentry/components/core/badge' ;
17
18
import {Button } from ' sentry/components/core/button' ;
19
+ import {Flex } from ' sentry/components/core/layout' ;
18
20
import {IconAdd , IconDelete , IconEdit , IconMail } from ' sentry/icons' ;
19
21
import * as Storybook from ' sentry/stories' ;
20
22
@@ -167,31 +169,24 @@ You can control the initial expansion state of alerts with the `defaultExpanded`
167
169
168
170
### Trailing Items
169
171
170
- Add interactive elements like buttons or links to the right side of alerts using the ` trailingItems ` prop.
172
+ Add interactive elements like buttons, links or badges to the right side of alerts using the ` trailingItems ` prop.
171
173
172
174
<Storybook.Demo >
173
175
<Alert.Container >
174
- <Alert
175
- type = " info"
176
- trailingItems = {
177
- <Button size = " xs" priority = " primary" >
178
- Take Action
179
- </Button >
180
- }
181
- >
182
- This alert has a trailing action button
176
+ <Alert type = " info" trailingItems = { <Badge type = " warning" >Action Required</Badge >} >
177
+ This alert has a trailing bagde
183
178
</Alert >
184
179
<Alert
185
180
type = " error"
186
181
trailingItems = {
187
- <div >
188
- <Button size = " xs " priority = " danger" icon = { <IconDelete />} >
182
+ <Flex gap = " sm " >
183
+ <Button size = " zero " priority = " danger" icon = { <IconDelete />} >
189
184
Delete
190
185
</Button >
191
- <Button size = " xs " priority = " muted" icon = { <IconEdit />} >
186
+ <Button size = " zero " priority = " muted" icon = { <IconEdit />} >
192
187
Edit
193
188
</Button >
194
- </div >
189
+ </Flex >
195
190
}
196
191
>
197
192
This alert has multiple trailing actions
@@ -203,24 +198,24 @@ Add interactive elements like buttons or links to the right side of alerts using
203
198
< Alert
204
199
type= " info"
205
200
trailingItems= {
206
- < Button size= " xs " priority= " primary" >
201
+ < Button size= " zero " priority= " primary" >
207
202
Take Action
208
203
< / Button>
209
204
}
210
205
>
211
- This alert has a trailing action button
206
+ This alert has a trailing badge
212
207
< / Alert>
213
208
< Alert
214
209
type= " error"
215
210
trailingItems= {
216
- < div >
217
- < Button size= " xs " priority= " danger" icon= {< IconDelete / > }>
211
+ < Flex gap = " sm " >
212
+ < Button size= " zero " priority= " danger" icon= {< IconDelete / > }>
218
213
Delete
219
214
< / Button>
220
- < Button size= " xs " priority= " muted" icon= {< IconEdit / > }>
215
+ < Button size= " zero " priority= " muted" icon= {< IconEdit / > }>
221
216
Edit
222
217
< / Button>
223
- < / div >
218
+ < / Flex >
224
219
}
225
220
>
226
221
This alert has multiple trailing actions
0 commit comments