import { NodeViewContent, NodeViewProps, NodeViewWrapper } from "@tiptap/react"; import { IconAlertTriangleFilled, IconCircleCheckFilled, IconCircleXFilled, IconInfoCircleFilled, } from "@tabler/icons-react"; import { Alert } from "@mantine/core"; import classes from "./callout.module.css"; import { CalloutType } from "@docmost/editor-ext"; export default function CalloutView(props: NodeViewProps) { const { node } = props; const { type, icon } = node.attrs; return ( ); } function getCalloutIcon(type: CalloutType, customIcon?: string) { if (customIcon && customIcon.trim() !== "") { return {customIcon}; } switch (type) { case "info": return ; case "success": return ; case "warning": return ; case "danger": return ; default: return ; } } function getCalloutColor(type: CalloutType) { switch (type) { case "info": return "blue"; case "success": return "green"; case "warning": return "orange"; case "danger": return "red"; case "default": return "gray"; default: return "blue"; } }