Merge pull request #271 from kagux/feature/components-in-card-title
allow passing components to card title and subtitleold
commit
80b2abe11d
|
@ -47,8 +47,14 @@ CardTitle.propTypes = {
|
||||||
PropTypes.array
|
PropTypes.array
|
||||||
]),
|
]),
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
subtitle: PropTypes.string,
|
subtitle: PropTypes.oneOfType([
|
||||||
title: PropTypes.string
|
PropTypes.string,
|
||||||
|
PropTypes.element
|
||||||
|
]),
|
||||||
|
title: PropTypes.oneOfType([
|
||||||
|
PropTypes.string,
|
||||||
|
PropTypes.element
|
||||||
|
])
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CardTitle;
|
export default CardTitle;
|
||||||
|
|
|
@ -45,6 +45,21 @@ const cards = {
|
||||||
</CardActions>
|
</CardActions>
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
|
}, {
|
||||||
|
name: 'Customized header',
|
||||||
|
component: (
|
||||||
|
<Card className={style.card}>
|
||||||
|
<CardTitle
|
||||||
|
title={<u>Title component</u>}
|
||||||
|
subtitle={<u>Subtitle component</u>}
|
||||||
|
/>
|
||||||
|
<CardText>{dummyText}</CardText>
|
||||||
|
<CardActions>
|
||||||
|
<Button label="Action 1" />
|
||||||
|
<Button label="Action 2" />
|
||||||
|
</CardActions>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
}],
|
}],
|
||||||
media: [{
|
media: [{
|
||||||
name: '16:9 Card Media Area',
|
name: '16:9 Card Media Area',
|
||||||
|
|
Loading…
Reference in New Issue