From e3e13b0491144e22a69130674b99a3c2d748c8b1 Mon Sep 17 00:00:00 2001 From: Xianming Zhong Date: Wed, 14 Feb 2018 14:52:56 +0800 Subject: [PATCH 1/2] chore(label): Migrate LabelButton --- src/components/label-button.component.js | 72 +++++++++--------------- 1 file changed, 26 insertions(+), 46 deletions(-) diff --git a/src/components/label-button.component.js b/src/components/label-button.component.js index 6995b184b..1e8325548 100644 --- a/src/components/label-button.component.js +++ b/src/components/label-button.component.js @@ -1,51 +1,31 @@ -import React from 'react'; -import { StyleSheet } from 'react-native'; import { Button } from 'react-native-elements'; +import styled from 'styled-components'; import { fonts } from 'config'; import { getFontColorByBackground } from 'utils'; -type Props = { - label: Object, - largeWithTag: boolean, -}; - -const styles = StyleSheet.create({ - smallLabelButton: { - padding: 5, - paddingTop: 3, - paddingBottom: 3, - borderRadius: 3, - marginLeft: 0, - marginRight: 10, - minWidth: 70, - }, - largeLabelButton: { - paddingTop: 5, - paddingBottom: 5, - paddingLeft: 10, - paddingRight: 10, - marginLeft: 0, - borderRadius: 3, - }, -}); - -export const LabelButton = ({ label, largeWithTag }: Props) => ( -