@playbooks/ui
Version:
An interface library for Playbooks.
95 lines (94 loc) • 2.62 kB
JavaScript
import { jsx } from "react/jsx-runtime";
import { useUI } from "./context.es.js";
import { H6, Font, P } from "./fonts.es.js";
import { Div } from "./html.es.js";
import { Section } from "./sections.es.js";
const Prefooter = ({ name = "Prefooter", tailwind, className, children, ...props }) => {
const context = useUI();
const base = context?.theme?.prefooter();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Section, { ...computed, children });
};
const PrefooterBody = ({
name = "PrefooterBody",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.prefooterBody();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Div, { ...computed, children });
};
const PrefooterPretitle = ({
name = "PrefooterPretitle",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.prefooterPretitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(H6, { ...computed, children });
};
const PrefooterTitle = ({
name = "PrefooterTitle",
size = "h2",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.prefooterTitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Font, { size, ...computed, children });
};
const PrefooterSubtitle = ({
name = "PrefooterSubtitle",
size = "h5",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.prefooterSubtitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Font, { size, ...computed, children });
};
const PrefooterText = ({
name = "PrefooterText",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.prefooterText();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(P, { ...computed, children });
};
const PrefooterActions = ({
name = "PrefooterActions",
tailwind,
className,
children,
...props
}) => {
const context = useUI();
const base = context?.theme?.prefooterActions();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ jsx(Div, { ...computed, children });
};
export {
Prefooter,
PrefooterActions,
PrefooterBody,
PrefooterPretitle,
PrefooterSubtitle,
PrefooterText,
PrefooterTitle
};