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">
|
||||||
<div className="setting-tile__content">
|
<div className="setting-tile__content">
|
||||||
<div className="setting-tile__title">
|
<div className="setting-tile__title">
|
||||||
<Text variant="b1">{title}</Text>
|
{
|
||||||
|
typeof title === 'string'
|
||||||
|
? <Text variant="b1">{title}</Text>
|
||||||
|
: title
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
{content}
|
{content}
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +28,7 @@ SettingTile.defaultProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
SettingTile.propTypes = {
|
SettingTile.propTypes = {
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.node.isRequired,
|
||||||
options: PropTypes.node,
|
options: PropTypes.node,
|
||||||
content: PropTypes.node,
|
content: PropTypes.node,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue