mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
17 lines
372 B
TypeScript
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>
|
|
);
|
|
} |