@gsretail.com/gui-core
Version:
A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook
2 lines (1 loc) • 1.06 kB
JavaScript
import{__rest as e,__assign as t}from"../../node_modules/tslib/tslib.es6.js";import n from"react";import{clsx as i}from"../../node_modules/clsx/dist/clsx.m.js";import{Card as r,CardActions as a,Box as m,Typography as l,IconButton as o,Collapse as d,CardContent as s}from"@mui/material";import{GuiIcon as c}from"../../node_modules/@gsretail.com/gui-icons/dist/index.js";import p from"./GuiCard.styled.js";var u=p((function(p){var u=p.contentMinHeight,x=p.children,E=p.expanded,f=p.setExpanded,h=e(p,["contentMinHeight","children","expanded","setExpanded"]);return n.createElement(r,t({},h),n.createElement(a,{disableSpacing:!0},n.createElement(m,{width:"90%"},n.createElement(l,{variant:"subtitle1"},h.title?h.title:"")),n.createElement(o,{size:"small",className:i("expand",{expandOpen:E}),onClick:function(){f(!E)}},n.createElement(c,{name:"ExpandMore"}))),n.createElement(d,{in:E,timeout:"auto",unmountOnExit:!0},n.createElement(s,{style:{minHeight:u}},x||"{children}")))}));u.defaultProps={contentMinHeight:"100px"};export{u as GuiCardExpand,u as default};