Skip to content

Commit

Permalink
Merge pull request #328 from kiwicom/added-support-for-node-in-alert-…
Browse files Browse the repository at this point in the history
…title

Add: Support React Node for Alert title
  • Loading branch information
Luděk Vepřek authored Aug 30, 2018
2 parents a3bed3f + debef15 commit 9ff2267
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Table below contains all types of the props available in Alert component.
| closable | `boolean` | `false` | If `true`, the Close icon will be displayed. [See Functional specs](#functional-specs)
| icon | `React.Element<any> \| boolean` | | The displayed icon. [See Functional specs](#functional-specs)
| onClose | `func` | | Function for handling Alert onClose.
| title | `string` | | The title of the Alert.
| title | `string` \| `React.Node` | | The title of the Alert.
| **type** | [`enum`](#enum) | `"info"` | The type of Alert.

### enum
Expand Down
2 changes: 1 addition & 1 deletion src/Alert/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Type = "info" | "success" | "warning" | "critical";
export type Props = {|
+type?: Type,
+children?: React$Node,
+title?: string,
+title?: string | React$Node,
+icon?: React$Element<any> | boolean,
+closable?: boolean,
+onClose?: () => void,
Expand Down
1 change: 1 addition & 0 deletions src/defaultTokens.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ import { defaultTokens } from "@kiwicom/orbit-design-tokens";
declare export default {
+orbit: typeof defaultTokens,
};

0 comments on commit 9ff2267

Please sign in to comment.