@red-hat-developer-hub/backstage-plugin-bulk-import
Version:
38 lines (35 loc) • 913 B
JavaScript
import { jsxs, jsx } from 'react/jsx-runtime';
import FormHelperText from '@mui/material/FormHelperText';
import TextField from '@mui/material/TextField';
const KeyValueTextField = ({
label,
name,
value,
onChange,
fieldError
}) => {
return /* @__PURE__ */ jsxs("div", { children: [
/* @__PURE__ */ jsx(
TextField,
{
multiline: true,
label,
placeholder: "key1: value2; key2: value2",
variant: "outlined",
margin: "normal",
fullWidth: true,
name,
value,
onChange,
error: !!fieldError,
helperText: fieldError
}
),
/* @__PURE__ */ jsxs(FormHelperText, { style: { marginLeft: "0.8rem" }, children: [
"Use semicolon to separate ",
label.toLocaleLowerCase("en-US")
] })
] });
};
export { KeyValueTextField as default };
//# sourceMappingURL=KeyValueTextField.esm.js.map