Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Commit 96d3225

Browse files
authored
Merge pull request #321 from cjdev/badge
Fix Badge PropTypes
2 parents ac004c9 + 28938fa commit 96d3225

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Upcoming
2+
3+
## Fix
4+
5+
- Fix Badge PropTypes
6+
17
# 7.0.1
28

39
## Updates

packages/visual-stack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cjdev/visual-stack",
3-
"version": "7.0.0",
3+
"version": "7.0.1",
44
"files": [
55
"dist",
66
"lib",

packages/visual-stack/src/components/Badge/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ Badge.defaultProps = {
2626
Badge.propTypes = {
2727
children: PropTypes.node,
2828
className: PropTypes.string,
29-
variant: PropTypes.oneOf('default', 'cj-green', '1', '2', '3', '4', '5'),
29+
variant: PropTypes.oneOf(['default', 'cj-green', '1', '2', '3', '4', '5']),
3030
};

packages/visual-stack/src/components/Badge/tests/index.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ describe('Badge', () => {
1111
document.body.appendChild(el);
1212

1313
test('should render children', () => {
14-
const wrapper = mount(
15-
<Badge backgroundColor="red" color="blue">
16-
CONTENT CERTIFIED
17-
</Badge>
18-
);
14+
const wrapper = mount(<Badge>CONTENT CERTIFIED</Badge>);
1915
expect(wrapper.find(Badge).text()).toEqual('CONTENT CERTIFIED');
2016
});
2117
});

0 commit comments

Comments
 (0)