From 08c0907a3c87ca5ee8e4c757e4f03225e61c09ef Mon Sep 17 00:00:00 2001 From: Boris Mikhaylov Date: Fri, 22 Jan 2016 13:31:55 +0100 Subject: [PATCH] allow passing components to card title and subtitle --- components/card/CardTitle.jsx | 10 ++++++++-- spec/components/card.jsx | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/components/card/CardTitle.jsx b/components/card/CardTitle.jsx index 7918b5b3..f5a550a2 100644 --- a/components/card/CardTitle.jsx +++ b/components/card/CardTitle.jsx @@ -47,8 +47,14 @@ CardTitle.propTypes = { PropTypes.array ]), className: PropTypes.string, - subtitle: PropTypes.string, - title: PropTypes.string + subtitle: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element + ]), + title: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element + ]) }; export default CardTitle; diff --git a/spec/components/card.jsx b/spec/components/card.jsx index 91addd6d..19487837 100644 --- a/spec/components/card.jsx +++ b/spec/components/card.jsx @@ -45,6 +45,21 @@ const cards = { ) + }, { + name: 'Customized header', + component: ( + + Title component} + subtitle={Subtitle component} + /> + {dummyText} + +