UNPKG

@trail-ui/react

Version:
23 lines (21 loc) 563 B
// src/alert/alert.tsx import { alert } from "@trail-ui/theme"; import { forwardRef, useMemo } from "react"; import { jsx } from "react/jsx-runtime"; function Alert(props, ref) { const { className, variant, color, radius, children, ...rest } = props; const styles = useMemo( () => alert({ variant, color, radius, className }), [className, color, radius, variant] ); return /* @__PURE__ */ jsx("div", { role: "alert", ...rest, ref, className: styles, children }); } var _Alert = forwardRef(Alert); export { _Alert };