Skip to content

Commit

Permalink
feat(CardTitle): possibility to define large title (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
kradio3 committed Jun 19, 2017
1 parent d1fba77 commit db55edf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Card/CardTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ import classnames from 'classnames';
const propTypes = {
className: PropTypes.string,
children: PropTypes.node,
large: PropTypes.bool,
};

const CardTitle = ({ className, children }) => (
const ROOT = 'mdc-card__title';
const LARGE = `${ROOT}--large`;

const CardTitle = ({ className, children, large }) => (
<h1
className={classnames('mdc-card__title', 'mdc-card__title--large', className)}
className={classnames(ROOT, {
[LARGE]: large,
}, className)}
>
{children}
</h1>
Expand Down

0 comments on commit db55edf

Please sign in to comment.