Scaffold web frontend: mock-backed chat + PDF split-view, Tailwind/shadcn
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { TriangleAlert } from "lucide-react";
|
||||
import { Alert, AlertDescription } from "./primitives/alert";
|
||||
import { cn } from "./lib/utils";
|
||||
|
||||
const DEFAULT_TEXT =
|
||||
"Nội dung trả lời được tổng hợp từ Dược thư quốc gia Việt Nam và chỉ mang tính tham khảo, " +
|
||||
"không thay thế chỉ định của bác sĩ hoặc dược sĩ.";
|
||||
|
||||
export interface DisclaimerBannerProps {
|
||||
text?: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function DisclaimerBanner({ text = DEFAULT_TEXT, className }: DisclaimerBannerProps) {
|
||||
return (
|
||||
<Alert
|
||||
variant="warning"
|
||||
className={cn(
|
||||
"flex items-center justify-center gap-2 rounded-none border-x-0 border-t-0 py-2.5 text-center",
|
||||
"[&>svg]:static [&>svg]:left-auto [&>svg]:top-auto [&>svg~*]:pl-0",
|
||||
className
|
||||
)}
|
||||
>
|
||||
<TriangleAlert className="h-4 w-4 shrink-0" aria-hidden="true" />
|
||||
<AlertDescription>{text}</AlertDescription>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user