Limit almost reached
You've used 92% of this month's transfer limit.
An inline message about the state of the page or a task.
import { ArrowRight } from "lucide-react";
import { Alert, AlertDescription, AlertTitle, Button } from "@thanawi/ui";
import { Bilingual, type ExampleProps } from "./_bilingual";
const copy = {
en: {
title: "Limit almost reached",
body: "You've used 92% of this month's transfer limit.",
action: "Increase limit",
secondary: "Learn more",
dismiss: "Dismiss",
},
ar: {
title: "اقتربت من الحد",
body: "استخدمت 92% من حد التحويل لهذا الشهر.",
action: "رفع الحد",
secondary: "اعرف المزيد",
dismiss: "إغلاق",
},
} as const;
export default function AlertDemo({ locale }: ExampleProps) {
return (
<Bilingual locale={locale} copy={copy} className="grid gap-8 lg:grid-cols-2">
{(t) => (
<Alert
variant="warning"
dismissible
dismissLabel={t.dismiss}
action={
<>
<Button size="sm" variant="secondary" endIcon={<ArrowRight className="rtl:-scale-x-100" />}>
{t.action}
</Button>
<Button size="sm" variant="ghost">
{t.secondary}
</Button>
</>
}
>
<AlertTitle>{t.title}</AlertTitle>
<AlertDescription>{t.body}</AlertDescription>
</Alert>
)}
</Bilingual>
);
}pnpm add @thanawi/uiimport { Alert } from '@thanawi/ui';<Alert>Your statement is ready.</Alert>Coming soon
Variants, states, accessibility notes and RTL behavior for Alert will be documented here when the component lands in @thanawi/ui.