From 8aa7c84136c25696a4cb75ab2e9ada3842c890ad Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 28 May 2019 09:58:55 -0500 Subject: [PATCH] EuiToast title prop should accept a node (#1962) * EuiToast title prop should accept a node * #1962 CL entry --- CHANGELOG.md | 4 +++- src/components/toast/index.d.ts | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3f3a5f5c85..36f5250e9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `11.2.0`. +**Bug fixes** + +- Fixes type mismatch between PropType and TypeScript def for `EuiToast` `title` ([#1962](https://github.com/elastic/eui/pull/1962)) ## [`11.2.0`](https://github.com/elastic/eui/tree/v11.2.0) diff --git a/src/components/toast/index.d.ts b/src/components/toast/index.d.ts index a1d5350aec9..6bf7e9030fc 100644 --- a/src/components/toast/index.d.ts +++ b/src/components/toast/index.d.ts @@ -2,7 +2,7 @@ import { EuiGlobalToastListItemProps as ToastListItemProps, EuiGlobalToastListItem as ToastListItem, } from './global_toast_list_item'; -import { CommonProps } from '../common'; +import { CommonProps, Omit } from '../common'; import { IconType } from '../icon'; import { @@ -10,6 +10,7 @@ import { FunctionComponent, HTMLAttributes, ReactChild, + ReactNode, } from 'react'; declare module '@elastic/eui' { @@ -20,11 +21,11 @@ declare module '@elastic/eui' { */ export interface EuiToastProps extends CommonProps, - HTMLAttributes { - title?: string, - color?: 'primary' | 'success' | 'warning' | 'danger', - iconType?: IconType, - onClose?: () => void, + Omit, 'title'> { + title?: ReactNode; + color?: 'primary' | 'success' | 'warning' | 'danger'; + iconType?: IconType; + onClose?: () => void; } export const EuiToast: FunctionComponent;