Allow node type prop in setting tile
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
50bf90fada
commit
d151e59223
1 changed files with 6 additions and 2 deletions
|
@ -9,7 +9,11 @@ function SettingTile({ title, options, content }) {
|
|||
<div className="setting-tile">
|
||||
<div className="setting-tile__content">
|
||||
<div className="setting-tile__title">
|
||||
<Text variant="b1">{title}</Text>
|
||||
{
|
||||
typeof title === 'string'
|
||||
? <Text variant="b1">{title}</Text>
|
||||
: title
|
||||
}
|
||||
</div>
|
||||
{content}
|
||||
</div>
|
||||
|
@ -24,7 +28,7 @@ SettingTile.defaultProps = {
|
|||
};
|
||||
|
||||
SettingTile.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
title: PropTypes.node.isRequired,
|
||||
options: PropTypes.node,
|
||||
content: PropTypes.node,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue