From b72c9cabcbc50d199ceccea5a9171def3c2ac4c4 Mon Sep 17 00:00:00 2001 From: Bree Hall Date: Thu, 30 Mar 2023 15:33:16 -0400 Subject: [PATCH] [REVERT ME] Added prop toggles to the EuiInlineEditText example for validation --- .../views/inline_edit/inline_edit_text.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src-docs/src/views/inline_edit/inline_edit_text.tsx b/src-docs/src/views/inline_edit/inline_edit_text.tsx index df4657d17b2..a420814ce9a 100644 --- a/src-docs/src/views/inline_edit/inline_edit_text.tsx +++ b/src-docs/src/views/inline_edit/inline_edit_text.tsx @@ -5,6 +5,7 @@ import { EuiSpacer, EuiButtonGroup, EuiInlineEditTextSizes, + EuiCheckbox, } from '../../../../src'; export default () => { @@ -27,6 +28,12 @@ export default () => { EuiInlineEditTextSizes >('m'); + const [isInvalidChecked, setIsInvalidChecked] = useState(false); + const [isLoadingChecked, setIsLoadingChecked] = useState(false); + + const toggleIsInvalid = (e: any) => setIsInvalidChecked(e.target.checked); + const toggleisLoading = (e: any) => setIsLoadingChecked(e.target.checked); + const textSizeOnChange = (optionId: EuiInlineEditTextSizes) => { setToggleTextButtonSize(optionId); }; @@ -42,10 +49,28 @@ export default () => { + toggleIsInvalid(e)} + /> + + toggleisLoading(e)} + /> + + + );