UNPKG

@wener/console

Version:

Base console UI toolkit

21 lines (20 loc) 702 B
import React from "react"; import { HiExclamationCircle } from "react-icons/hi2"; import { showErrorToast } from "../toast/index.js"; import { cn } from "../tw/index.js"; export const ErrorPlaceholder = ({ error, className, ...props }) => { if (!error) { return null; } return /*#__PURE__*/ React.createElement("div", { role: "button", className: cn("btn btn-square btn-ghost btn-xs flex items-center text-warning", className), ...props, onClick: () => { showErrorToast(error); } }, /*#__PURE__*/ React.createElement(HiExclamationCircle, { className: "h-4 w-4" })); }; //# sourceMappingURL=ErrorPlaceholder.js.map