Skip to content

Commit

Permalink
EuiStat title and description should allow ReactNode (#1910)
Browse files Browse the repository at this point in the history
* EuiStat title and description should allow ReactNode

* update changelog

* Fix TS
  • Loading branch information
bevacqua authored May 2, 2019
1 parent f43e98d commit 0db687b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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 `10.3.0`.
**Bug fixes**

- Fixed a regression where `EuiStat` reported accepting `string` for `title`, `description`, even though `ReactNode` is acceptable ([#1910](https://github.com/elastic/eui/pull/1910))

## [`10.3.0`](https://github.com/elastic/eui/tree/v10.3.0)

Expand Down
11 changes: 8 additions & 3 deletions src/components/stat/stat.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import React, { Fragment, HTMLAttributes, FunctionComponent } from 'react';
import React, {
Fragment,
HTMLAttributes,
FunctionComponent,
ReactNode,
} from 'react';
import { CommonProps, keysOf } from '../common';
import classNames from 'classnames';

Expand Down Expand Up @@ -31,7 +36,7 @@ export interface EuiStatProps {
/**
* Set the description (label) text
*/
description: string;
description: ReactNode;
/**
* Will hide the title with an animation until false
*/
Expand All @@ -44,7 +49,7 @@ export interface EuiStatProps {
/**
* The (value) text
*/
title: string;
title: ReactNode;
/**
* The color of the title text
*/
Expand Down

0 comments on commit 0db687b

Please sign in to comment.