UNPKG

mui-toolpad-extended-tuni

Version:
33 lines (32 loc) 1.19 kB
/** @format */ /** * EditableText Component * * @version 3.0.0 * @breaking-changes * - Added disabled state support * - Enhanced layout with flex styling for better alignment * - Improved hover state handling * - Added justification controls for edit button * * A text field that can be toggled between read-only and edit modes. * In read-only mode, displays text with an edit button that appears on hover. * In edit mode, displays a text field for editing. * * @param {Object} props * @param {string} props.label - Label for the text field * @param {string} props.value - Current value * @param {function} props.onChange - Callback when value changes * @param {string} [props.helperText] - Helper text to display below the field * @param {boolean} [props.disabled] - Whether the field is disabled */ interface EditableTextProps { value: string; onChange: (value: string) => void; label: string; multiline?: boolean; helperText?: string; disabled?: boolean; } declare const EditableText: ({ value, onChange, label, multiline, helperText, disabled, }: EditableTextProps) => import("react/jsx-runtime").JSX.Element; export default EditableText;