UNPKG

@red-hat-developer-hub/backstage-plugin-bulk-import

Version:
39 lines (36 loc) 1.03 kB
import { jsxs, jsx } from 'react/jsx-runtime'; import FormHelperText from '@mui/material/FormHelperText'; import TextField from '@mui/material/TextField'; import { useTranslation } from '../../hooks/useTranslation.esm.js'; const KeyValueTextField = ({ label, name, value, onChange, fieldError }) => { const { t } = useTranslation(); return /* @__PURE__ */ jsxs("div", { children: [ /* @__PURE__ */ jsx( TextField, { multiline: true, label, placeholder: t("previewFile.keyValuePlaceholder"), variant: "outlined", margin: "normal", fullWidth: true, name, value, onChange, error: !!fieldError, helperText: fieldError } ), /* @__PURE__ */ jsx(FormHelperText, { style: { marginLeft: "0.8rem" }, children: t("previewFile.useSemicolonSeparator", { label: label.toLocaleLowerCase("en-US") }) }) ] }); }; export { KeyValueTextField as default }; //# sourceMappingURL=KeyValueTextField.esm.js.map