| 1 |
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; |
| 2 |
import { Fragment } from 'react'; |
| 3 |
import { TextInput } from '@patternfly/react-core/dist/esm/components/TextInput'; |
| 4 |
import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inline-edit.mjs'; |
| 5 |
import formStyles from '@patternfly/react-styles/css/components/Form/form.mjs'; |
| 6 |
import { css } from '@patternfly/react-styles'; |
| 7 |
export const EditableTextCell = ({ value, rowIndex, cellIndex, props, handleTextInputChange, inputAriaLabel, isDisabled = false }) => (_jsxs(Fragment, { children: [_jsx("div", { className: inlineStyles.inlineEditValue, children: value }), _jsxs("div", { className: inlineStyles.inlineEditInput, children: [_jsx(TextInput, { isDisabled: isDisabled, value: props.editableValue !== undefined ? props.editableValue : value, validated: props.isValid !== false ? 'default' : 'error', type: "text", onChange: (event, newValue) => { |
| 8 |
handleTextInputChange(newValue, event, rowIndex, cellIndex); |
| 9 |
}, "aria-label": inputAriaLabel }), _jsx("div", { className: css(formStyles.formHelperText), "aria-live": "polite", children: props.errorText })] })] })); |
| 10 |
EditableTextCell.displayName = 'EditableTextCell'; |
| 11 |
//# sourceMappingURL=EditableTextCell.js.map |