Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
fix(Alert): Avoid conflict with other header classnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Lin Yap authored and Han Lin Yap committed Jun 16, 2017
1 parent 3140735 commit 37cb998
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/components/alert/alert-styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default createStyleSheet('Alert', theme => {
marginBottom: '16px',
color: palette.text.default,

'& .header': {
'& .alert-header': {
display: 'inline-block',
fontWeight: 'bold',
padding: '4px',
Expand Down Expand Up @@ -49,23 +49,23 @@ export default createStyleSheet('Alert', theme => {
success: {
borderLeft: `2px solid ${palette.variant.success}`,

'& .header': {
'& .alert-header': {
color: palette.variant.success,
},
},

warning: {
borderLeft: `2px solid ${palette.variant.warning}`,

'& .header': {
'& .alert-header': {
color: palette.variant.warning,
},
},

danger: {
borderLeft: `2px solid ${palette.variant.danger}`,

'& .header': {
'& .alert-header': {
color: palette.variant.danger,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/alert/alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Alert extends React.PureComponent {
},
this.props.className,
);
const headerClassName = classNames('header', {
const headerClassName = classNames('alert-header', {
vertical: this.props.vertical,
});

Expand Down
2 changes: 1 addition & 1 deletion test/components/alert/alert.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('<Alert />', () => {
});

it('should render the header if provided', () => {
expect(wrapper.find('div.header').childAt(0).text()).to.equal('header');
expect(wrapper.find('div.alert-header').childAt(0).text()).to.equal('header');
});

it('should render the children if provided', () => {
Expand Down

0 comments on commit 37cb998

Please sign in to comment.