Skip to content

Commit

Permalink
No need for base editor props
Browse files Browse the repository at this point in the history
  • Loading branch information
saskliutas committed Dec 20, 2024
1 parent 12c3105 commit 6a28cab
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions ui/components-react/src/components-react/newEditors/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,18 @@ export interface EditorSpec {
}

/**
* Base editor props that are supplied to every editor when rendering it.
* Generic editor props that are supplied to the editor for rendering.
* @beta
*/
interface BaseEditorProps<TValue = Value> {
export interface EditorProps<TValue = Value> {
metadata: ValueMetadata;
value?: TValue;
onChange: (value: TValue) => void;
onFinish: () => void;
disabled?: boolean;
size?: "small" | "large";
}

/**
* Generic editor props that are supplied to the editor for rendering.
* @beta
*/
export interface EditorProps<TValue = Value> extends BaseEditorProps<TValue> {
value?: TValue;
}

/**
* A type that makes a specific properties required in a type.
* @beta
Expand Down

0 comments on commit 6a28cab

Please sign in to comment.