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
|
||||
]),
|
||||
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;
|
||||
|
|
|
@ -45,6 +45,21 @@ const cards = {
|
|||
</CardActions>
|
||||
</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: [{
|
||||
name: '16:9 Card Media Area',
|
||||
|
|
Loading…
Reference in New Issue