mirror of
https://github.com/zadam/trilium.git
synced 2026-02-21 13:14:26 +01:00
17 lines
542 B
TypeScript
17 lines
542 B
TypeScript
import { HTML } from "mermaid/dist/diagram-api/types.js";
|
|
import { ComponentChildren, HTMLAttributes } from "preact";
|
|
|
|
interface AdmonitionProps extends Pick<HTMLAttributes<HTMLDivElement>, "style"> {
|
|
type: "warning" | "note" | "caution";
|
|
children: ComponentChildren;
|
|
className?: string;
|
|
}
|
|
|
|
export default function Admonition({ type, children, className, ...props }: AdmonitionProps) {
|
|
return (
|
|
<div className={`admonition ${type} ${className}`} role="alert" {...props}>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|