feat(react/widgets): port shared_info

This commit is contained in:
Elian Doran
2025-08-30 13:59:53 +03:00
parent 5f647a932d
commit fbec6d8873
16 changed files with 103 additions and 104 deletions

View File

@@ -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}