This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree 2 files changed +32
-7
lines changed
2 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,15 @@ const balanceStyles = StyleSheet.create({
15
15
numeral : {
16
16
fontFamily : 'WorkSans ExtraLight' ,
17
17
fontSize : font . sizeXXXL ,
18
- lineHeight : font . lineHeightXXXL ,
18
+ lineHeight : null ,
19
+ marginLeft : 10 ,
20
+ marginRight : 10 ,
19
21
} ,
20
22
unit : {
21
23
fontFamily : 'WorkSans Regular' ,
22
24
fontSize : font . sizeL ,
23
- lineHeight : 60 ,
24
- marginLeft : 10 ,
25
+ paddingTop : 5 ,
26
+ marginRight : 10 ,
25
27
} ,
26
28
} ) ;
27
29
@@ -35,7 +37,13 @@ BalanceLabel.propTypes = {
35
37
} ;
36
38
37
39
export const BalanceLabelNumeral = ( { children, style } ) => (
38
- < Text style = { [ balanceStyles . numeral , style ] } > { children } </ Text >
40
+ < Text
41
+ style = { [ balanceStyles . numeral , style ] }
42
+ adjustsFontSizeToFit = { true }
43
+ numberOfLines = { 1 }
44
+ >
45
+ { children }
46
+ </ Text >
39
47
) ;
40
48
41
49
BalanceLabelNumeral . propTypes = {
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import PropTypes from 'prop-types';
5
5
import Background from '../component/background' ;
6
6
import MainContent from '../component/main-content' ;
7
7
import { Header , Title } from '../component/header' ;
8
- import { color } from '../component/style' ;
8
+ import { createStyles , maxWidth } from '../component/media-query' ;
9
+ import { color , breakWidth , smallBreakWidth } from '../component/style' ;
9
10
import { H4Text } from '../component/text' ;
10
11
import Icon from '../component/icon' ;
11
12
import ChannelIcon from '../asset/icon/channel' ;
@@ -83,7 +84,7 @@ HomeView.propTypes = {
83
84
// Balance Display
84
85
//
85
86
86
- const balanceStyles = StyleSheet . create ( {
87
+ const baseBalanceStyles = {
87
88
wrapper : {
88
89
flex : 1 ,
89
90
justifyContent : 'center' ,
@@ -92,7 +93,23 @@ const balanceStyles = StyleSheet.create({
92
93
marginTop : 30 ,
93
94
marginBottom : 5 ,
94
95
} ,
95
- } ) ;
96
+ } ;
97
+
98
+ const balanceStyles = createStyles (
99
+ baseBalanceStyles ,
100
+
101
+ maxWidth ( breakWidth , {
102
+ wrapper : {
103
+ width : 350 ,
104
+ } ,
105
+ } ) ,
106
+
107
+ maxWidth ( smallBreakWidth , {
108
+ wrapper : {
109
+ width : 250 ,
110
+ } ,
111
+ } )
112
+ ) ;
96
113
97
114
const BalanceDisplay = ( {
98
115
depositLabel,
You can’t perform that action at this time.
0 commit comments