@playbooks/ui
Version:
An interface library for Playbooks.
100 lines (99 loc) • 3.59 kB
JavaScript
import { jsx } from "react/jsx-runtime";
import { a as computeProps, F as Footer$1 } from "./index.es-7ZX4yv7W.js";
import { Btn } from "./buttons.es.js";
import { useUI } from "./context.es.js";
import { Font, P } from "./fonts.es.js";
import { Div, Ul, Li } from "./html.es.js";
import { Link } from "./links.es.js";
const Footer = ({ name = "Footer", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footer();
const formatted = { ...base, ...props, ...tailwind };
const filtered = computeProps(props);
return /* @__PURE__ */ jsx(Footer$1, { name, tailwind: formatted, className, ...filtered, children });
};
const FooterHeader = ({
name = "FooterHeader",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.footerHeader();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Div, { ...computed, children });
};
const FooterBody = ({ name = "FooterBody", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footerBody();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Div, { ...computed, children });
};
const FooterTitle = ({
name = "FooterTitle",
size = "h6",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.footerTitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Font, { size, ...computed, children });
};
const FooterText = ({ name = "FooterText", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footerText();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(P, { ...computed, children });
};
const FooterList = ({ name = "FooterList", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footerList();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Ul, { ...computed, children });
};
const FooterItem = ({ name = "FooterItem", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footerItem();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Li, { ...computed, children });
};
const FooterBtn = ({ name = "FooterBtn", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footerBtn();
const computed = { ...base, ...props, tailwind, className, children, name };
return /* @__PURE__ */ jsx(Btn, { variant: "text", ...computed });
};
const FooterLink = ({ name = "FooterLink", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.footerLink();
const computed = { ...base, ...props, tailwind, className, children, name };
return /* @__PURE__ */ jsx(Link, { variant: "text", ...computed });
};
const FooterFooter = ({
name = "FooterFooter",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.footerFooter();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Div, { ...computed, children });
};
export {
Footer,
FooterBody,
FooterBtn,
FooterFooter,
FooterHeader,
FooterItem,
FooterLink,
FooterList,
FooterText,
FooterTitle
};