UNPKG

@crossed/ui

Version:

A universal & performant styling library for React Native, Next.js & React

28 lines (27 loc) 866 B
import { jsx, jsxs } from "react/jsx-runtime"; import { Text } from "./Text"; import { XBox } from "../layout/XBox"; import { YBox } from "../layout/YBox"; import { composeStyles, createStyles } from "@crossed/styled"; const useList = createStyles((t) => ({ ul: { base: { gap: t.space.xs } }, li: { base: { gap: t.space.xs } }, disc: { base: { fontSize: 9 } } })); const Ul = ({ style, ...props }) => { return /* @__PURE__ */ jsx(YBox, { role: "list", ...props, style: composeStyles(useList.ul, style) }); }; const Li = ({ children, style, ...props }) => { return /* @__PURE__ */ jsxs(XBox, { ...props, style: composeStyles(useList.li, style), role: "listitem", children: [ /* @__PURE__ */ jsxs(Text, { style: useList.disc, children: [ "\u2B24", " " ] }), children ] }); }; export { Li, Ul }; //# sourceMappingURL=List.js.map