Files
Trilium/apps/client/src/widgets/react/Alert.tsx
2025-08-05 21:15:02 +03:00

17 lines
372 B
TypeScript

import { ComponentChildren } from "preact";
interface AlertProps {
type: "info" | "danger";
title?: string;
children: ComponentChildren;
}
export default function Alert({ title, type, children }: AlertProps) {
return (
<div className={`alert alert-${type}`}>
{title && <h4>{title}</h4>}
{children}
</div>
);
}