Skip to content

Commit

Permalink
changed heading behaviour adding title and subtitle classes at same t…
Browse files Browse the repository at this point in the history
…ime. fixes couds#29
  • Loading branch information
DimitarChristoff committed May 14, 2018
1 parent e6030c5 commit c3747db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`Heading component Should be a subtitle with size rendered as P 1`] = `

exports[`Heading component Should be spaced 1`] = `
<p
className="title subtitle is-spaced"
className="title is-spaced"
style={Object {}}
>
Subtitle
Expand All @@ -20,7 +20,7 @@ exports[`Heading component Should be spaced 1`] = `

exports[`Heading component Should concat classname in props with Bulma classname 1`] = `
<h1
className="other-class this-is-a-test title subtitle"
className="other-class this-is-a-test title"
style={Object {}}
>
<p>
Expand All @@ -33,7 +33,7 @@ exports[`Heading component Should exist 1`] = `[Function]`;

exports[`Heading component Should have title classname 1`] = `
<h1
className="title subtitle"
className="title"
style={Object {}}
>
Test
Expand All @@ -54,7 +54,7 @@ exports[`Heading component Should not be spaced because is subtitle 1`] = `

exports[`Heading component Should use inline styles 1`] = `
<h1
className="title subtitle"
className="title"
style={
Object {
"height": 250,
Expand Down
2 changes: 1 addition & 1 deletion src/components/heading/heading.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Heading extends PureComponent {
{...props}
className={classnames(className, {
title: !subtitle && !heading,
subtitle: !heading,
subtitle,
heading,
[`is-${size}`]: size,
'is-spaced': spaced && !subtitle,
Expand Down

0 comments on commit c3747db

Please sign in to comment.