UNPKG

@korautils/forms

Version:

![image](https://github.com/user-attachments/assets/ccad1514-7b15-4952-9856-fd03b971403a)

4 lines 982 B
import {a}from'./chunk-6DPEEXVJ.mjs';import {styled,FormControl,InputLabel,MenuItem,FormHelperText}from'@mui/material';import x from'@mui/material/Select';import w from'react';import {jsx,jsxs}from'react/jsx-runtime';var m=styled("div")` width: 100%; `;var E=w.forwardRef(function({id:r=a(),name:c=a(),label:o,size:f="small",defaultNoneText:s="None",value:d,helperText:n,onChange:v,options:S,showNone:g=!0,error:b},C){let F=e=>{let a=e.target.value;v(e,a);};return jsx(m,{children:jsxs(FormControl,{size:f,fullWidth:!0,error:b,children:[o&&jsx(InputLabel,{id:`label_${r}`,children:o}),jsxs(x,{ref:C,name:c,labelId:`label_${r}`,id:`select_${r}`,value:d,label:o,onChange:F,children:[g&&jsx(MenuItem,{value:"Kora_None",children:jsx("em",{children:s})}),S?.map((e,a)=>jsx(MenuItem,{value:e.value,children:e.label},e.value))]}),n&&jsx(FormHelperText,{children:n})]})})}),i=E;var A=i;export{A as a};//# sourceMappingURL=chunk-OKMYB4ZY.mjs.map //# sourceMappingURL=chunk-OKMYB4ZY.mjs.map