From 2bd7064c047d2f909e13327ba080d1b05c18c538 Mon Sep 17 00:00:00 2001 From: Tom Begley Date: Wed, 28 Dec 2022 13:29:56 +0000 Subject: [PATCH] Nested components (#917) * Allow components to be passed to NavbarSimple.brand and DropdownMenu.label * Allow components to be passed to Toast.header --- src/components/dropdownmenu/DropdownMenu.js | 2 +- src/components/nav/NavbarSimple.js | 2 +- src/components/toast/Toast.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/dropdownmenu/DropdownMenu.js b/src/components/dropdownmenu/DropdownMenu.js index 0b2341ac6..8e310ef98 100644 --- a/src/components/dropdownmenu/DropdownMenu.js +++ b/src/components/dropdownmenu/DropdownMenu.js @@ -151,7 +151,7 @@ DropdownMenu.propTypes = { /** * Label for the DropdownMenu toggle. */ - label: PropTypes.string, + label: PropTypes.node, /** * Direction in which to expand the DropdownMenu. Default: 'down'. `left` diff --git a/src/components/nav/NavbarSimple.js b/src/components/nav/NavbarSimple.js index aa0285796..d7a03f534 100644 --- a/src/components/nav/NavbarSimple.js +++ b/src/components/nav/NavbarSimple.js @@ -116,7 +116,7 @@ NavbarSimple.propTypes = { /** * Brand text, to go top left of the navbar. */ - brand: PropTypes.string, + brand: PropTypes.node, /** * Link to attach to brand. diff --git a/src/components/toast/Toast.js b/src/components/toast/Toast.js index 92d0c683a..6068870e4 100644 --- a/src/components/toast/Toast.js +++ b/src/components/toast/Toast.js @@ -206,7 +206,7 @@ Toast.propTypes = { /** * Text to populate the header with */ - header: PropTypes.string, + header: PropTypes.node, /** * Set to True to add a dismiss button to the header which will close the