Skip to content

Commit

Permalink
fix: re-enable color prop for the badge component (#648)
Browse files Browse the repository at this point in the history
* fix: enable back the color prop from badge

* fix: set black text by default

* refactor: switch to a clearer style
  • Loading branch information
machour authored and chinesedfan committed Dec 5, 2017
1 parent c04174c commit 14532ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/badge.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const BadgeContainer = styled.View`
height: 18;
border-color: ${colors.alabaster};
border-width: 1;
${({ backgroundColor }) => `background-color: ${backgroundColor};`};
background-color: ${({ backgroundColor }) => backgroundColor};
`;

const BadgeText = styled.Text`
${{ ...fonts.fontPrimaryBold }};
background-color: transparent;
${({ largeText }) =>
`font-size: ${largeText ? normalize(9.5) : normalize(7)};`};
color: ${({ color }) => color || color.black};
font-size: ${({ largeText }) => (largeText ? normalize(9.5) : normalize(7))};
`;

export const Badge = ({ color, backgroundColor, text, largeText }: Props) => (
Expand Down

0 comments on commit 14532ce

Please sign in to comment.