Skip to content

Commit

Permalink
fix(Blockquote): same padding if no content is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Utzel-Butzel committed Dec 17, 2019
1 parent 85ae033 commit 6375f82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/components/Blockquote/Blockquote.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class Blockquote extends React.Component {
this.setState({ open: !this.state.open });
};

showInnerHtml = content => {
/*showInnerHtml = content => {
return { __html: content };
};
};*/

render() {
const {
Expand All @@ -63,6 +63,7 @@ class Blockquote extends React.Component {
'wfp--blockquote--toggleable': toggleable === true,
'wfp--blockquote--light': light,
'wfp--blockquote--code': code,
'wfp--blockquote--no-content': !children,
'wfp--blockquote--error': kind === 'error' || error,
'wfp--blockquote--warning': kind === 'warning' || warning,
'wfp--blockquote--success': kind === 'success',
Expand All @@ -71,8 +72,7 @@ class Blockquote extends React.Component {
'wfp--blockquote--open': this.state.open,
});

const blockquoteContentClass = classNames({
'wfp--blockquote__content': true,
const blockquoteContentClass = classNames('wfp--blockquote__content', {
[`${className}`]: className,
});

Expand Down Expand Up @@ -115,12 +115,12 @@ class Blockquote extends React.Component {
</div>
)}
{children}
{innerHtml && (
{/*innerHtml && (
<div
role="complementary"
dangerouslySetInnerHTML={this.showInnerHtml(innerHtml)}
/>
)}
)*/}
</div>
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions src/components/Blockquote/_blockquote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
word-wrap: anywhere;
}

.#{$prefix}--blockquote--no-content {
.#{$prefix}--blockquote__title {
margin-bottom: 0;
}
}

.#{$prefix}--blockquote--with-icon {
//padding-left: 4rem;
}
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/Colours/ColourList-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ storiesOf('Design|Core', module)
}}
src={`${process.env.STORYBOOK_INTERNAL_ASSETS}internal/colors.png`}
/>
<h3>Primary Colours</h3>
<ul className="color--list">{colorList(brandColors)}</ul>
<Color color="interactive-01" />
<h4 className="wfp--story__sub-heading">
Primary interactive colour, Primary buttons
Expand Down Expand Up @@ -458,8 +460,6 @@ storiesOf('Design|Core', module)
</List>
</div>
</section>
<h3>Primary Colours</h3>
<ul className="color--list">{colorList(brandColors)}</ul>
<h3>User Interface Colours</h3>
<p>
Neutral colours are used for non-interactive elements, backgrounds and
Expand Down

0 comments on commit 6375f82

Please sign in to comment.