From 1f32f88a6ff49876b7258e28bd3d865027cc6e38 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 11 Jun 2020 10:18:38 -0600 Subject: [PATCH] Correct IconControlProps to include an onClick definition (#3581) * Correct IconControlProps to include an onClick definition * changelog --- CHANGELOG.md | 1 + src/components/control_bar/control_bar.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6afd0dca249a..64e0533d79aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fixed DOM element creation issues in `EuiOverlayMask` by using lifecycle methods ([#3555](https://github.com/elastic/eui/pull/3555)) - Fixed `EuiComboBox`'s options list `zIndex` positioning when nested in other `zIndex` contexts ([#3551](https://github.com/elastic/eui/pull/3551)) - Fixed `euiHeaderAffordForFixed` mixin's use of header SASS variable ([#3592](https://github.com/elastic/eui/pull/3592)) +- Included `onClick` as a valid prop for `EuiControlBar` **icon** controls ([#3581](https://github.com/elastic/eui/pull/3581)) **Breaking changes** diff --git a/src/components/control_bar/control_bar.tsx b/src/components/control_bar/control_bar.tsx index 8bee5186d4b8..08834fcb3191 100644 --- a/src/components/control_bar/control_bar.tsx +++ b/src/components/control_bar/control_bar.tsx @@ -22,6 +22,7 @@ import React, { ButtonHTMLAttributes, Component, HTMLAttributes, + MouseEventHandler, Ref, } from 'react'; import { EuiScreenReaderOnly } from '../accessibility'; @@ -119,6 +120,7 @@ export interface IconControlProps { controlType: 'icon'; id: string; iconType: string; + onClick?: MouseEventHandler; } /**