UNPKG

@lanaco/lnc-react-ui

Version:

React component library

8 lines (7 loc) 1.17 kB
"use strict";const x=require("react/jsx-runtime"),p=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),r=require("./index-BPVoEhTF.cjs"),s=require("./utils-NZLCh-J5.cjs"),c=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),g=p.newStyled.div` padding: ${e=>e.padding}; box-shadow: ${e=>s.getBoxShadowValue(e.theme,e.boxShadow)}; border-radius: ${e=>s.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)}; width: ${e=>e.fullWidth?"100%":"fit-content"}; border-top: 1px solid rgba(0, 0, 0, 0.04); `,o=({children:e,style:t={},className:d="",boxShadow:n="s",borderRadius:i="regular",padding:l="s",fullWidth:a=!1})=>{const u=c.useTheme(),m={xs:"0.25rem",s:"0.5rem",m:"0.75rem",l:"1rem",xl:"1.25rem",xxl:"1.5rem"};return x.jsx(g,{theme:u,style:t,className:"lnc-ui-surface "+d,borderRadius:i,boxShadow:n,padding:m[l],fullWidth:a,children:e})};o.propTypes={borderRadius:r.PropTypes.oneOf(["slight","regular","edged","curved","none"]),boxShadow:r.PropTypes.oneOf(["xs","s","m","l","xl","xxl"]),paddign:r.PropTypes.oneOf(["xs","s","m","l","xl","xxl"]),fullWidth:r.PropTypes.bool,className:r.PropTypes.string,style:r.PropTypes.object};module.exports=o;