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

fix(Alert): Avoid conflict with other header classnames #245

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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