From 3b5ecfcd5153a64dd511536ccdc1307742ad9830 Mon Sep 17 00:00:00 2001 From: Chandler Date: Tue, 28 Aug 2018 11:52:00 -0600 Subject: [PATCH] Update the typedef for EuiSwitch's onChange prop (#1144) * Update the typedef for EuiSwitch's onChange prop * changelog --- CHANGELOG.md | 6 ++++-- src/components/form/switch/index.d.ts | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bdd1a68ae5..980a95ef813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `3.7.0`. - - Added color and monotone icons for AWS and GCP. ([#1135](https://github.com/elastic/eui/pull/1135)) +**Bug fixes** + +- Fixed `onChange` typedef on `EuiSwitch` ([#1144](https://github.com/elastic/eui/pull/1144) + ## [`3.7.0`](https://github.com/elastic/eui/tree/v3.7.0) - Added `zIndexAdjustment` to `EuiPopover` which allows tweaking the popover content's `z-index` ([#1097](https://github.com/elastic/eui/pull/1097)) diff --git a/src/components/form/switch/index.d.ts b/src/components/form/switch/index.d.ts index 2e6aac98184..f3c67f8c25e 100644 --- a/src/components/form/switch/index.d.ts +++ b/src/components/form/switch/index.d.ts @@ -6,12 +6,9 @@ declare module '@elastic/eui' { /** * @see './switch.js' */ - export type EuiSwitchChangeCallback = (state: boolean) => void; - export type EuiSwitchProps = CommonProps & - Omit, 'onChange'> & { + InputHTMLAttributes & { label?: ReactNode; - onChange?: EuiSwitchChangeCallback; }; export const EuiSwitch: SFC;