Skip to content

Commit

Permalink
feat(EditableInput): expose inputType (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
talkor authored Oct 22, 2023
1 parent a7e8237 commit 3ca2b61
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/EditableInput/EditableInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
isTabEvent
} from "../../utils/dom-event-utils";
import VibeComponent from "../../types/VibeComponent";
import { VibeComponentProps } from "../../types";
import { VibeComponentProps, withStaticProps } from "../../types";
import { InputType } from "./EditableInputConstants";
import { ComponentDefaultTestId, getTestId } from "../../tests/test-ids-utils";
import styles from "./EditableInput.module.scss";
Expand Down Expand Up @@ -49,7 +49,9 @@ export interface EditableInputProps extends VibeComponentProps {
onTabHandler?: (value: string, event: React.KeyboardEvent) => void;
}

const EditableInput: VibeComponent<EditableInputProps> = forwardRef(
const EditableInput: VibeComponent<EditableInputProps> & {
inputTypes?: typeof InputType;
} = forwardRef(
(
{
className,
Expand Down Expand Up @@ -255,4 +257,6 @@ const EditableInput: VibeComponent<EditableInputProps> = forwardRef(
}
);

export default EditableInput;
export default withStaticProps(EditableInput, {
inputTypes: InputType
});

0 comments on commit 3ca2b61

Please sign in to comment.