mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
feat(react/widgets): port shared_info
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import { ComponentChildren } from "preact";
|
||||
import { CSSProperties } from "preact/compat";
|
||||
|
||||
interface AlertProps {
|
||||
type: "info" | "danger" | "warning";
|
||||
title?: string;
|
||||
children: ComponentChildren;
|
||||
className?: string;
|
||||
style?: CSSProperties;
|
||||
}
|
||||
|
||||
export default function Alert({ title, type, children, className }: AlertProps) {
|
||||
export default function Alert({ title, type, children, className, style }: AlertProps) {
|
||||
return (
|
||||
<div className={`alert alert-${type} ${className ?? ""}`}>
|
||||
<div className={`alert alert-${type} ${className ?? ""}`} style={style}>
|
||||
{title && <h4>{title}</h4>}
|
||||
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user