@gsretail.com/gui-core
Version:
A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook
2 lines (1 loc) • 877 B
JavaScript
import{__rest as e,__assign as i}from"tslib";import l from"react";import{Box as t}from"@mui/material";import r from"./GuiLabel.styled.js";var a=r((function(r){var a=r.label,o=r.labelWidth,m=r.labelTextAlign,n=r.direction,d=r.width,c=r.minHeight,u=r.required,b=r.children,h=r.className,s=r.boxProps;return e(r,["label","labelWidth","labelTextAlign","direction","width","minHeight","required","children","className","boxProps"]),l.createElement(t,i({className:["gui-form-label","column"===n?"direction-column":"direction-row",h&&h].join(" "),width:d,minHeight:c},s),l.createElement(t,{minWidth:o},l.createElement("label",{className:["gui-label","textAligh-"+m,u&&"Mui-required",h&&h].join(" ")},a)),l.createElement(t,{flexGrow:1},b&&b))}));a.defaultProps={labelWidth:"auto",labelTextAlign:"left",direction:"row",width:"100%",minHeight:"auto"};export{a as GuiLabel,a as default};