From 86b453ce5a521802608dd7a824efb44d289747e3 Mon Sep 17 00:00:00 2001 From: Ines Falcao <70115704+egeofalcao@users.noreply.github.com> Date: Fri, 11 Nov 2022 17:56:40 +1300 Subject: [PATCH] feat: Added props onFocus and onClick to component TextInputFormatted (#104) --- src/lui/TextInputFormatted.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lui/TextInputFormatted.tsx b/src/lui/TextInputFormatted.tsx index fbc92a79..8a2a05f4 100644 --- a/src/lui/TextInputFormatted.tsx +++ b/src/lui/TextInputFormatted.tsx @@ -1,12 +1,20 @@ import "./TextInputFormatted.scss"; -import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes } from "react"; +import { + ChangeEventHandler, + DetailedHTMLProps, + FocusEventHandler, + InputHTMLAttributes, + MouseEventHandler, +} from "react"; import clsx from "clsx"; import { LuiIcon } from "@linzjs/lui"; export interface LuiTextInputProps { onChange?: ChangeEventHandler; + onFocus?: FocusEventHandler; + onClick?: MouseEventHandler; inputProps?: DetailedHTMLProps, HTMLInputElement>; error?: string | boolean | null; warning?: string | boolean | null; @@ -38,6 +46,8 @@ export const TextInputFormatted = (props: LuiTextInputProps): JSX.Element => { spellCheck={true} defaultValue={props.value} onChange={props.onChange} + onFocus={props.onFocus} + onClick={props.onClick} {...props.inputProps} /> {props.formatted}