@gsretail.com/gui-core
Version:
A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook
2 lines (1 loc) • 952 B
JavaScript
import{__rest as e,__assign as t}from"tslib";import n from"react";import i from"clsx";import{Card as r,CardActions as a,Box as m,Typography as l,IconButton as o,Collapse as c,CardContent as d}from"@mui/material";import{GuiIcon as p}from"@gsretail.com/gui-icons";import s from"./GuiCard.styled.js";var u=s((function(s){var u=s.contentMinHeight,E=s.children,x=s.expanded,f=s.setExpanded,h=e(s,["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:x}),onClick:function(){f(!x)}},n.createElement(p,{name:"ExpandMore"}))),n.createElement(c,{in:x,timeout:"auto",unmountOnExit:!0},n.createElement(d,{style:{minHeight:u}},E||"{children}")))}));u.defaultProps={contentMinHeight:"100px"};export{u as GuiCardExpand,u as default};