@gsretail.com/gui-core
Version:
A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook
2 lines (1 loc) • 832 B
JavaScript
import{__rest as e,__assign as a}from"tslib";import t from"react";import{Box as r,Typography as n}from"@mui/material";import{GuiIcon as i}from"@gsretail.com/gui-icons";import l from"./GuiHelpText.styled.js";var m=l((function(l){var m=l.variant,o=l.size,c=l.noIcon,s=l.children,p=l.className,f=e(l,["variant","size","noIcon","children","className"]);return t.createElement(r,a({className:["gui-helpText",o&&"size-"+o,p&&p].join(" ")},f),!c&&t.createElement(t.Fragment,null,"notice"===m&&t.createElement(n,{className:"helpIcon"},"※"),"info"===m&&t.createElement(i,{name:"InfoFill"}),"warning"===m&&t.createElement(i,{name:"WarningFill"}),"error"===m&&t.createElement(i,{name:"WaringAltFill"})),t.createElement(n,{className:"helpText"},s&&s))}));m.defaultProps={variant:"notice",size:"medium"};export{m as GuiHelpText,m as default};