UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

37 lines (36 loc) 1.17 kB
/** * This module includes an inline editor UI control. * * To be able to use these controls the CanKingDataProvider component must be present in the * component tree above your component. Normally the CanKingDataProvider is added * at the root of the component tree. * * @packageDocumentation */ import { JSX } from 'react'; import { TypographyVariant } from '@mui/material'; /** * Properties of the InlineEditor React component. */ export interface InlineEditorProps { /** Flag indicating if in edit mode or not. */ editMode: boolean; /** The current value. */ value: string; /** * Callback that will be called when the value has been changed. * @param value - The new value. */ onValueChange: (value: string) => void; /** An aria label. */ ariaLabel?: string; /** The variant of the text control. */ variant?: TypographyVariant; } /** * Creates an inline editor. * @param props - Component properties. * @returns The InlineEditor React component. */ declare function InlineEditor({ editMode, value, onValueChange, ariaLabel, variant, }: InlineEditorProps): JSX.Element; export default InlineEditor;