Skip to content

Commit 58515aa

Browse files
committed
Alerts table menu using the new popover
1 parent ac162ec commit 58515aa

File tree

1 file changed

+11
-6
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts

1 file changed

+11
-6
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,17 @@ export default function Page() {
233233
</TableCell>
234234
<TableCellMenu
235235
isSticky
236+
popoverContent={
237+
alertChannel.enabled ? (
238+
<DisableAlertChannelButton id={alertChannel.id} />
239+
) : (
240+
<EnableAlertChannelButton id={alertChannel.id} />
241+
)
242+
}
236243
className={
237244
alertChannel.enabled ? "" : "group-hover/table-row:bg-charcoal-800/50"
238245
}
239246
>
240-
{alertChannel.enabled ? (
241-
<DisableAlertChannelButton id={alertChannel.id} />
242-
) : (
243-
<EnableAlertChannelButton id={alertChannel.id} />
244-
)}
245-
246247
<DeleteAlertChannelButton id={alertChannel.id} />
247248
</TableCellMenu>
248249
</TableRow>
@@ -394,6 +395,8 @@ function DisableAlertChannelButton(props: { id: string }) {
394395
name="action"
395396
value="disable"
396397
type="submit"
398+
fullWidth
399+
textAlignLeft
397400
variant="small-menu-item"
398401
LeadingIcon={BellSlashIcon}
399402
leadingIconClassName="text-dimmed"
@@ -432,6 +435,8 @@ function EnableAlertChannelButton(props: { id: string }) {
432435
name="action"
433436
value="enable"
434437
type="submit"
438+
fullWidth
439+
textAlignLeft
435440
variant="small-menu-item"
436441
LeadingIcon={BellAlertIcon}
437442
leadingIconClassName="text-success"

0 commit comments

Comments
 (0)