diff --git a/apps/desktop/src/renderer/components/SidebarCardSlot/SidebarCardSlot.tsx b/apps/desktop/src/renderer/components/SidebarCardSlot/SidebarCardSlot.tsx index f58c04c021d..867f316127b 100644 --- a/apps/desktop/src/renderer/components/SidebarCardSlot/SidebarCardSlot.tsx +++ b/apps/desktop/src/renderer/components/SidebarCardSlot/SidebarCardSlot.tsx @@ -44,11 +44,11 @@ export function SidebarCardSlot({ {!isCollapsed && entry && ( + ) : undefined, onClick: () => { track("release_notes_card_clicked", { version }); diff --git a/packages/ui/src/components/ui/sidebar-card.tsx b/packages/ui/src/components/ui/sidebar-card.tsx index 45b93bc1b23..6bbc8a34fcb 100644 --- a/packages/ui/src/components/ui/sidebar-card.tsx +++ b/packages/ui/src/components/ui/sidebar-card.tsx @@ -1,6 +1,6 @@ import { msg } from "@lingui/core/macro"; import type * as React from "react"; -import { LuX } from "react-icons/lu"; +import { LuMinus, LuX } from "react-icons/lu"; import { i18n } from "../../lib/i18n"; import { cn } from "../../lib/utils"; import { Badge } from "./badge"; @@ -33,6 +33,80 @@ function SidebarCard({ className, children, }: SidebarCardProps) { + const dismissLabel = i18n._( + msg({ + message: "Dismiss", + }), + ); + + if (media) { + return ( +
+
+
+ {media} +
+
+
+ {badge && {badge}} +

+ {title} +

+ {description && ( +

+ {description} +

+ )} +
+
+ + {onClick && ( + + )} + + {children} + + {actionLabel && onAction && ( +
+ +
+ )} +
+ ); + } + return (
)} - {media && ( -
- {media} -
- )} - {badge && {badge}} {onDismiss && ( )}