Skip to content

Commit

Permalink
EuiToast title prop should accept a node (#1962)
Browse files Browse the repository at this point in the history
* EuiToast title prop should accept a node

* #1962 CL entry
  • Loading branch information
thompsongl authored May 28, 2019
1 parent 0d3c199 commit 8aa7c84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
13 changes: 7 additions & 6 deletions src/components/toast/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ 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 {
Component,
FunctionComponent,
HTMLAttributes,
ReactChild,
ReactNode,
} from 'react';

declare module '@elastic/eui' {
Expand All @@ -20,11 +21,11 @@ declare module '@elastic/eui' {
*/
export interface EuiToastProps
extends CommonProps,
HTMLAttributes<HTMLDivElement> {
title?: string,
color?: 'primary' | 'success' | 'warning' | 'danger',
iconType?: IconType,
onClose?: () => void,
Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
title?: ReactNode;
color?: 'primary' | 'success' | 'warning' | 'danger';
iconType?: IconType;
onClose?: () => void;
}

export const EuiToast: FunctionComponent<EuiToastProps>;
Expand Down

0 comments on commit 8aa7c84

Please sign in to comment.