Skip to content

Commit

Permalink
feat(Tag): Remove old skins
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsilva committed May 23, 2019
1 parent a33fb1a commit e83bc62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 462 deletions.
30 changes: 1 addition & 29 deletions components/Tag/Tag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,13 @@ import Colors from '../Colors';
import Icon from '../Icon';

const skinFontColors = {
inverted: Colors.WHITE,
blue: Colors.BLUE[500],
success: Colors.SUCCESS[900],
warning: Colors.WARNING[900],
error: Colors.ERROR[900],
'blue-text': Colors.BLUE[500],
};

const skins = {
default: `background-color: ${Colors.BLACK[100]};`,
stroked: `
border: 1px solid;
background: none;
`,
inverted: `
color: ${skinFontColors.inverted}
background-color: ${Colors.BLACK[400]};
`,
blue: `
color: ${skinFontColors.blue}
background-color: ${Colors.BLUE[200]};
`,
success: `
color: ${skinFontColors.success}
background-color: ${Colors.SUCCESS[200]};
Expand All @@ -39,10 +24,6 @@ const skins = {
color: ${skinFontColors.error}
background-color: ${Colors.ERROR[200]};
`,
'blue-text': `
color: ${skinFontColors['blue-text']}
background-color: ${Colors.BLACK[100]};
`,
};

const sizes = {
Expand Down Expand Up @@ -121,16 +102,7 @@ Tag.propTypes = {
/** A callback that is called when close button is clicked */
onClose: PropTypes.func,
size: PropTypes.oneOf(['small', 'medium', 'large']),
skin: PropTypes.oneOf([
'default',
'stroked',
'inverted',
'blue',
'success',
'warning',
'error',
'blue-text',
]),
skin: PropTypes.oneOf(['default', 'success', 'warning', 'error']),
text: PropTypes.string,
};

Expand Down
8 changes: 0 additions & 8 deletions components/Tag/Tag.unit.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ describe('<Tag />', () => {
it('with bold prop', () => testSnapshot({ bold: true }));

describe('Skins', () => {
it('stroked', () => testSnapshot({ skin: 'stroked' }));
it('inverted', () => testSnapshot({ skin: 'inverted' }));
it('blue', () => testSnapshot({ skin: 'blue' }));
it('success', () => testSnapshot({ skin: 'success' }));
it('warning', () => testSnapshot({ skin: 'warning' }));
it('error', () => testSnapshot({ skin: 'error' }));
it('blue-text', () => testSnapshot({ skin: 'blue-text' }));
it('default', () => {
testSnapshot({ skin: 'default' });

Expand All @@ -43,13 +39,9 @@ describe('<Tag />', () => {
describe('onClose Prop', () => {
it('is rendering well', () => {
testSnapshot({ onClose: () => {} });
testSnapshot({ onClose: () => {}, skin: 'stroked' });
testSnapshot({ onClose: () => {}, skin: 'inverted' });
testSnapshot({ onClose: () => {}, skin: 'blue' });
testSnapshot({ onClose: () => {}, skin: 'success' });
testSnapshot({ onClose: () => {}, skin: 'warning' });
testSnapshot({ onClose: () => {}, skin: 'error' });
testSnapshot({ onClose: () => {}, skin: 'blue-text' });
});

it('is called when close button is clicked', () => {
Expand Down
Loading

0 comments on commit e83bc62

Please sign in to comment.