UNPKG

@playbooks/ui

Version:

An interface library for Playbooks.

19 lines (18 loc) 594 B
import { jsxs, jsx } from "react/jsx-runtime"; import { useUI } from "./context.es.js"; import { Head } from "./head.es.js"; import { Div } from "./html.es.js"; const Route = ({ name = "Route", seo, tailwind, className, children, ...props }) => { const context = useUI(); const base = context?.theme?.route(); const computed = { ...base, ...props, tailwind, className, name }; const ui = useUI(); const head = { ...ui?.seo, ...seo }; return /* @__PURE__ */ jsxs(Div, { ...computed, children: [ /* @__PURE__ */ jsx(Head, { ...head }), children ] }); }; export { Route };