UNPKG

@gsretail.com/gui-core

Version:

A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook

2 lines (1 loc) 909 B
import{__rest as e,__assign as i}from"../../node_modules/tslib/tslib.es6.js";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,s=r.required,u=r.children,b=r.className,h=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",b&&b].join(" "),width:d,minHeight:c},h),l.createElement(t,{minWidth:o},l.createElement("label",{className:["gui-label","textAligh-"+m,s&&"Mui-required",b&&b].join(" ")},a)),l.createElement(t,{flexGrow:1},u&&u))}));a.defaultProps={labelWidth:"auto",labelTextAlign:"left",direction:"row",width:"100%",minHeight:"auto"};export{a as GuiLabel,a as default};