mirror of
https://github.com/zadam/trilium.git
synced 2025-10-27 01:28:59 +01:00
17 lines
384 B
TypeScript
17 lines
384 B
TypeScript
import { ComponentChildren } from "preact";
|
|
|
|
interface AlertProps {
|
|
type: "info" | "danger" | "warning";
|
|
title?: string;
|
|
children: ComponentChildren;
|
|
}
|
|
|
|
export default function Alert({ title, type, children }: AlertProps) {
|
|
return (
|
|
<div className={`alert alert-${type}`}>
|
|
{title && <h4>{title}</h4>}
|
|
|
|
{children}
|
|
</div>
|
|
);
|
|
} |