fix(web): add close icon for slow request toast #2040
Closedkendalled(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/2040/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -397,7 +413,20 @@397413 data-slot="toast-popup"398414 toast={toast}399415 >416+ {toast.data?.showCloseButton ? (417+ <button418+ aria-label="Dismiss notification"419+ className={cn(420+ buttonVariants({ size: "icon-xs", variant: "ghost" }),421+ "absolute top-2 right-2 z-10 size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground",422+ )}423+ onClick={() => anchoredToastManager.close(toast.id)}424+ type="button"425+ >426+ <XIcon className="size-3" />427+ </button>428+ ) : null}400429 {tooltipStyle ? (401430 <Toast.Content className="pointer-events-auto px-2 py-1">402431 <Toast.Title data-slot="toast-title" />403432 </Toast.Content>
- @@ -373,3 +373,6 @@373373 timeout: 0,374374 title: "Some requests are slow",375375 type: "warning" as const,376+ data: {377+ showCloseButton: true,378+ },
kendalled(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
dbe1a95c-ff4e-4e24-a23d-ce4f03e5ed37You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share