Skip to content

Commit

Permalink
fix(Chip): change size regular to medium
Browse files Browse the repository at this point in the history
  • Loading branch information
whilelucky committed Mar 8, 2018
1 parent bdb2d9e commit 0cb2b32
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions src/components/Chip/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const Chip = styled.div`
border-radius: 100px;
border: 1px solid ${(p) => p.theme.color[p.color]};
${(p) => ({
regular: `
font-size: ${p.theme.fontSize.xs};
padding: ${p.theme.px([1, 1.5])};
`,
small: `
font-size: ${p.theme.fontSize.xxs};
padding: ${p.theme.px(0.5)};
`,
medium: `
font-size: ${p.theme.fontSize.xs};
padding: ${p.theme.px([1, 1.5])};
`,
}[p.size])}
${(p) => ({
solid: `
Expand All @@ -31,13 +31,13 @@ const Chip = styled.div`

Chip.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOf(['regular', 'small']),
size: PropTypes.oneOf(['small', 'medium']),
kind: PropTypes.oneOf(['solid', 'outlined']),
};

Chip.defaultProps = {
color: 'primary',
size: 'regular',
size: 'medium',
kind: 'outlined',
};

Expand Down
10 changes: 5 additions & 5 deletions src/components/Chip/Chip.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ storiesOf('Chip', module)
<Chip
color={select('color', Object.keys(theme.color), 'primary')}
kind={select('kind', ['solid', 'outlined'], 'outlined')}
size={select('size', ['small', 'regular'], 'regular')}
size={select('size', ['small', 'medium'], 'medium')}
>
{text('children', 'Chip')}
</Chip>
Expand All @@ -27,12 +27,12 @@ storiesOf('Chip', module)
))
.add('size', () => (
<div>
<Chip>
regular
</Chip>
<br /><br />
<Chip size="small">
small
</Chip>
<br /><br />
<Chip>
medium
</Chip>
</div>
));
12 changes: 6 additions & 6 deletions src/components/Chip/native/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const ChipContainer = styled.View`
align-items: center;
justify-content: center;
${(p) => ({
regular: `
padding: ${p.theme.px([1, 1.5])};
`,
small: `
padding: ${p.theme.px(0.5)};
`,
medium: `
padding: ${p.theme.px([1, 1.5])};
`,
}[p.size])}
${(p) => ({
solid: `
Expand Down Expand Up @@ -41,8 +41,8 @@ const Chip = ({ style, color, size, kind, children }) => (
outlined: color,
}[kind]}
size={{
regular: 'xs',
small: 'xxs',
medium: 'xs',
}[size]}
>
{children}
Expand All @@ -56,14 +56,14 @@ Chip.propTypes = {
PropTypes.object,
]),
color: PropTypes.string,
size: PropTypes.oneOf(['regular', 'small']),
size: PropTypes.oneOf(['small', 'medium']),
kind: PropTypes.oneOf(['solid', 'outlined']),
children: PropTypes.string,
};

Chip.defaultProps = {
color: 'primary',
size: 'regular',
size: 'medium',
kind: 'outlined',
};

Expand Down
4 changes: 2 additions & 2 deletions storybook/native/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ storiesOf('Chip', module)
</Spacer>
<Spacer margin={2}>
<Chip color="yellow" kind="solid">
solid regular
solid medium
</Chip>
</Spacer>
<Spacer margin={2}>
Expand All @@ -231,7 +231,7 @@ storiesOf('Chip', module)
</Spacer>
<Spacer margin={2}>
<Chip color="lagoon">
outlined regular
outlined medium
</Chip>
</Spacer>
<Spacer margin={2}>
Expand Down

0 comments on commit 0cb2b32

Please sign in to comment.