Skip to content

Commit

Permalink
fix(CardTitle,CardSubtitle): div as default tag (#1298)
Browse files Browse the repository at this point in the history
Closes #1297
  • Loading branch information
eckdanny-osi authored and TheSharpieOne committed Nov 16, 2018
1 parent b45907b commit ea0f1f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CardSubtitle.js
Expand Up @@ -10,7 +10,7 @@ const propTypes = {
};

const defaultProps = {
tag: 'h6'
tag: 'div'
};

const CardSubtitle = (props) => {
Expand Down
2 changes: 1 addition & 1 deletion src/CardTitle.js
Expand Up @@ -10,7 +10,7 @@ const propTypes = {
};

const defaultProps = {
tag: 'h5'
tag: 'div'
};

const CardTitle = (props) => {
Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/CardSubtitle.spec.js
Expand Up @@ -24,4 +24,10 @@ describe('CardSubtitle', () => {
expect(wrapper.hasClass('card-subtitle')).toBe(true);
expect(wrapper.find('h3').length).toBe(1);
});

it('should render a "div" tag by default', () => {
const wrapper = shallow(<CardSubtitle>Yo!</CardSubtitle>);

expect(wrapper.find('div').length).toBe(1);
});
});
4 changes: 2 additions & 2 deletions src/__tests__/CardTitle.spec.js
Expand Up @@ -25,9 +25,9 @@ describe('CardTitle', () => {
expect(wrapper.find('h1').length).toBe(1);
});

it('should render a "h5" tag by default', () => {
it('should render a "div" tag by default', () => {
const wrapper = shallow(<CardTitle>Yo!</CardTitle>);

expect(wrapper.find('h5').length).toBe(1);
expect(wrapper.find('div').length).toBe(1);
});
});

0 comments on commit ea0f1f0

Please sign in to comment.