diff --git a/src/Badge/README.md b/src/Badge/README.md index 65dbf6be44..8dfbb00799 100644 --- a/src/Badge/README.md +++ b/src/Badge/README.md @@ -12,7 +12,7 @@ Table below contains all types of the props available in Badge component. | Name | Type | Default | Description | | :------------ | :---------------------| :-------------- | :------------------------------- | -| **children** | `React.Node` | | The content of the Badge. +| children | `React.Node` | | The content of the Badge. | dataTest | `string` | | Optional prop for testing purposes. | icon | `React.Node` | | The displayed icon on the left. | type | [`enum`](#enum) | `"neutral"` | The color type of the Badge. diff --git a/src/Badge/index.js.flow b/src/Badge/index.js.flow index a6c809c5f8..c31776ce14 100644 --- a/src/Badge/index.js.flow +++ b/src/Badge/index.js.flow @@ -18,7 +18,7 @@ export type Type = | "criticalInverted"; export type Props = {| - +children: React$Node, + +children?: React$Node, +type?: Type, +icon?: React$Node, +ariaLabel?: string, diff --git a/src/NotificationBadge/NotificationBadge.stories.js b/src/NotificationBadge/NotificationBadge.stories.js index c5dc1f2629..9b6a38a383 100644 --- a/src/NotificationBadge/NotificationBadge.stories.js +++ b/src/NotificationBadge/NotificationBadge.stories.js @@ -126,9 +126,15 @@ storiesOf("NotificationBadge", module) const type = select("Type", Object.values(TYPE_OPTIONS), TYPE_OPTIONS.INFO); const dataTest = text("dataTest", "test"); const ariaLabel = text("ariaLabel", "additional information for screen readers"); + const Icon = getIcon(getIcons("Airplane")); return ( - + } + > {content} ); diff --git a/src/NotificationBadge/README.md b/src/NotificationBadge/README.md index dd720417af..4993edf548 100644 --- a/src/NotificationBadge/README.md +++ b/src/NotificationBadge/README.md @@ -12,7 +12,7 @@ Table below contains all types of the props available in NotificationBadge compo | Name | Type | Default | Description | | :------------ | :---------------------| :-------------- | :------------------------------- | -| **children** | `React.Node` | | The content of the NotificationBadge. +| children | `React.Node` | | The content of the NotificationBadge. | dataTest | `string` | | Optional prop for testing purposes. | icon | `React.Node` | | The displayed icon on the left. | type | [`enum`](#enum) | `"neutral"` | The color type of the NotificationBadge. diff --git a/src/NotificationBadge/index.js.flow b/src/NotificationBadge/index.js.flow index 95e9bea434..e61a4160b2 100644 --- a/src/NotificationBadge/index.js.flow +++ b/src/NotificationBadge/index.js.flow @@ -7,7 +7,7 @@ import type { Globals } from "../common/common.js.flow"; import type { Type } from "../Badge/index.js.flow"; export type Props = {| - +children: React$Node, + +children?: React$Node, +type?: Type, +icon?: React$Node, +ariaLabel?: string,