UNPKG

@lanaco/lnc-react-ui

Version:

React component library

91 lines (90 loc) 2.26 kB
import { jsx as G } from "react/jsx-runtime"; import { forwardRef as I } from "react"; import { P as e } from "./index-S5Cd7WrG.js"; import { n as C } from "./emotion-styled.browser.esm-CjCaF13H.js"; const h = C.div` display: ${(t) => t.inline ? "inline-grid" : "grid"}; row-gap: ${(t) => t.rowGap ? t.rowGap : t.gap ? t.gap : 0}; column-gap: ${(t) => t.columnGap ? t.columnGap : t.gap ? t.gap : 0}; ${(t) => t.gridTemplate && `grid-template: ${t.gridTemplate};`} ${(t) => t.templateRows && `grid-template-rows: ${t.templateRows};`} ${(t) => t.templateColumns && `grid-template-columns: ${t.templateColumns};`} ${(t) => t.justifyItems && `justify-items: ${t.justifyItems};`} ${(t) => t.alignItems && `align-items: ${t.alignItems};`} ${(t) => t.justifyContent && `justify-content: ${t.justifyContent};`} ${(t) => t.templateAreas && `grid-template-areas: ${t.templateAreas};`} `, a = I((t, s) => { const { inline: n = !1, template: l, templateColumns: i, templateRows: m, gap: r, rowGap: o, columnGap: g, justifyItems: c, alignItems: p, justifyContent: f, templateAreas: d, children: u, className: y = "", style: $ = {}, ...w } = t; var j = { inline: n, template: l, templateColumns: i, templateRows: m, gap: r, rowGap: o, columnGap: g, justifyItems: c, alignItems: p, justifyContent: f, templateAreas: d }; return /* @__PURE__ */ G( h, { ref: s, ...j, className: y, style: $, ...w, children: u } ); }); a.defaultProps = { inline: !1, style: {}, className: "" }; a.propTypes = { inline: e.bool, template: e.string, templateColumns: e.string, templateRows: e.string, gap: e.string, rowGap: e.string, columnGap: e.string, justifyItems: e.oneOf(["start", "end", "center", "stretch"]), alignItems: e.oneOf(["start", "end", "center", "stretch"]), placeItems: e.oneOf(["start", "end", "center", "stretch"]), justifyContent: e.oneOf([ "start", "end", "center", "stretch", "space-between", "space-evenly" ]), templateAreas: e.string, //------------- style: e.object, className: e.string }; export { a as default };