Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 2795c73

Browse files
committed
Replace SmallLabel with H4Text component
1 parent 965a77f commit 2795c73

File tree

4 files changed

+24
-28
lines changed

4 files changed

+24
-28
lines changed

src/component/label.js

-21
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,3 @@ SmallBalanceLabel.propTypes = {
8484
unit: PropTypes.string,
8585
style: TextPropTypes.style,
8686
};
87-
88-
//
89-
// Small Label
90-
//
91-
92-
const smallStyles = StyleSheet.create({
93-
label: {
94-
fontFamily: 'OpenSans SemiBold',
95-
fontSize: font.sizeS,
96-
lineHeight: font.lineHeightS,
97-
},
98-
});
99-
100-
export const SmallLabel = ({ children, style }) => (
101-
<Text style={[smallStyles.label, style]}>{children}</Text>
102-
);
103-
104-
SmallLabel.propTypes = {
105-
children: PropTypes.string.isRequired,
106-
style: TextPropTypes.style,
107-
};

src/component/text.js

+22-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,28 @@ export const H1Text = ({ children = '', style }) => (
6767
);
6868

6969
H1Text.propTypes = {
70-
children: PropTypes.string,
70+
children: PropTypes.string.isRequired,
71+
style: TextPropTypes.style,
72+
};
73+
74+
//
75+
// H4 Text
76+
//
77+
78+
const h4Styles = StyleSheet.create({
79+
text: {
80+
fontFamily: 'OpenSans SemiBold',
81+
fontSize: font.sizeS,
82+
lineHeight: font.lineHeightS,
83+
},
84+
});
85+
86+
export const H4Text = ({ children, style }) => (
87+
<Text style={[h4Styles.text, style]}>{children}</Text>
88+
);
89+
90+
H4Text.propTypes = {
91+
children: PropTypes.string.isRequired,
7192
style: TextPropTypes.style,
7293
};
7394

src/view/home.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import MainContent from '../component/main-content';
77
import Icon from '../component/icon';
88
import { Header, Title } from '../component/header';
99
import { colors } from '../component/style';
10+
import { H4Text } from '../component/text';
1011
import {
1112
BalanceLabel,
1213
BalanceLabelNumeral,
1314
BalanceLabelUnit,
1415
SmallBalanceLabel,
15-
SmallLabel,
1616
} from '../component/label';
1717
import {
1818
Button,
@@ -97,7 +97,7 @@ const BalanceDisplay = ({
9797
<BalanceLabelNumeral>{channelBalanceLabel}</BalanceLabelNumeral>
9898
<BalanceLabelUnit>{unitLabel}</BalanceLabelUnit>
9999
</BalanceLabel>
100-
<SmallLabel style={balanceStyles.smallLabel}>Pending Deposit</SmallLabel>
100+
<H4Text style={balanceStyles.smallLabel}>Pending Deposit</H4Text>
101101
<SmallBalanceLabel unit={unitLabel}>{balanceLabel}</SmallBalanceLabel>
102102
</Button>
103103
</View>

stories/component/label.js

-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
BalanceLabelNumeral,
66
BalanceLabelUnit,
77
SmallBalanceLabel,
8-
SmallLabel,
98
} from '../../src/component/label';
109
import { colors } from '../../src/component/style';
1110

@@ -31,7 +30,4 @@ storiesOf('Labels', module)
3130
<SmallBalanceLabel unit="SAT" style={{ color: colors.blackText }}>
3231
9,123,456,788
3332
</SmallBalanceLabel>
34-
))
35-
.add('Small Label', () => (
36-
<SmallLabel style={{ color: colors.blackText }}>Small Label</SmallLabel>
3733
));

0 commit comments

Comments
 (0)