Skip to content

Commit 7f260a8

Browse files
committed
fix(webapp): align sidebar alert typography
UsageLimitAlert carried the same drift the overdue alert just had: 12px for both lines where the design specifies a 13px title over a 12px body, plus an underline the design doesn't have. Move it onto the generated Figma text styles so the two alerts match when they stack in the sidebar footer, which they do on a Free plan with an unpaid invoice. Also records why the overdue alert has no dismiss button, since the design does show one.
1 parent f416e02 commit 7f260a8

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

packages/webapp/src/components/patterns/OverdueInvoiceAlert.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ interface OverdueInvoiceAlertProps {
1010
*
1111
* Hand-rolled rather than built on `ui/Alert`, whose look has drifted from the design
1212
* system's — fold both into the DS alert once it lands there.
13+
*
14+
* Deliberately not dismissible, unlike the alert in the design: an unpaid invoice stays
15+
* true until it's paid, so the warning should persist rather than be closable.
1316
*/
1417
export function OverdueInvoiceAlert({ portalUrl }: OverdueInvoiceAlertProps) {
1518
return (

packages/webapp/src/layout/AppSidebar/UsageLimitAlert.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ export default function UsageLimitAlert() {
4040
const { Icon, title, body, container, accent } = VARIANTS[state];
4141

4242
return (
43-
<div className={cn('flex gap-2 rounded border-[0.5px] px-2 py-2', container)}>
44-
<Icon className={cn('size-4 shrink-0', accent)} />
45-
<div className="flex flex-col gap-0.5">
46-
<p className={cn('text-body-small-regular', accent)}>{title}</p>
47-
<p className="text-body-small-regular text-text-default">{body}</p>
48-
<Link
49-
to="/team/billing#usage"
50-
className={cn('inline-flex w-fit items-center gap-1 mt-1 rounded-[2px] underline text-body-small-regular focus-default', accent)}
51-
>
43+
<div className={cn('flex items-start gap-2 rounded border-[0.5px] px-2 py-2', container)}>
44+
<Icon className={cn('mt-0.5 size-4 shrink-0', accent)} />
45+
<div className="flex flex-col gap-1">
46+
<div className="flex flex-col gap-0.5">
47+
<p className={cn('type-text-regular-sm', accent)}>{title}</p>
48+
<p className="type-text-regular-xs text-text-default">{body}</p>
49+
</div>
50+
<Link to="/team/billing#usage" className={cn('type-text-regular-sm focus-default inline-flex w-fit items-center gap-1 rounded-[2px]', accent)}>
5251
View usage
5352
<ExternalLink className="size-3" />
5453
</Link>

0 commit comments

Comments
 (0)