-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCashBalance.mixed.tsx
43 lines (32 loc) · 1.13 KB
/
CashBalance.mixed.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react';
import { Text } from 'react-native';
import { ViewStyle } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import { store } from '../../../../inject';
import CircleButton from '../../../utils/CircleButton';
import { observer } from 'mobx-react-lite';
import { Space } from '../../../theme/Space';
import { Row, Spacer } from '../../../utils/Layout';
import { Font } from '../../../theme/Font';
export const CashBalance_Mixed = observer(() => {
const $cashBalance: ViewStyle = { paddingTop: 16, paddingLeft: 16, paddingRight: 8, alignItems: 'center' };
return (
<Row style={$cashBalance}>
<Text style={Font.medium()}>{`Cash Balance: ${store.portfolio.cashBalance}`}</Text>
<Space.px8 />
<Spacer />
<CircleButton
color={'white'}
backgroundColor={'#388E3C'}
icon={'add'}
onPress={() => store.portfolio.cashBalance.add(100)}
/>
<Space.px4 />
<CircleButton
color={'white'}
backgroundColor={'#C62828'}
icon={'remove'}
onPress={() => store.portfolio.cashBalance.remove(100)}
/>
</Row>
);
});