-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathKeyValueRow.stories.tsx
124 lines (118 loc) · 3.83 KB
/
KeyValueRow.stories.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Third party dependencies.
import React from 'react';
// External dependencies
import { withNavigation } from '../../../../storybook/decorators';
import ethLogo from '../../../images/eth-logo-new.png';
// Internal dependencies
import { View, StyleSheet } from 'react-native';
import KeyValueRowComponent, { TooltipSizes } from './index';
import Text, { TextColor, TextVariant } from '../../components/Texts/Text';
import Title from '../../../components/Base/Title';
const KeyValueRowMeta = {
title: 'Components Temp / KeyValueRow',
component: KeyValueRowComponent,
decorators: [withNavigation],
};
export default KeyValueRowMeta;
const styles = StyleSheet.create({
container: {
padding: 16,
},
listItem: {
marginVertical: 16,
gap: 16,
},
});
export const KeyValueRow = {
render: () => (
<View style={styles.container}>
<Title>KeyValueRow Component</Title>
<Text variant={TextVariant.BodySM}>
Prebuilt component displayed below but KeyValueRow stubs are available
to create new types fo KeyValueRow types.
</Text>
<View style={styles.listItem}>
<KeyValueRowComponent
keyText={{
textPrimary: { text: 'Sample Key Text' },
}}
valueText={{ textPrimary: { text: 'Sample Value Text' } }}
/>
<KeyValueRowComponent
keyText={{
textPrimary: { text: 'Sample Key Text' },
textSecondary: {
text: 'Secondary Key Text',
variant: TextVariant.BodySMMedium,
color: TextColor.Alternative,
},
}}
valueText={{
textPrimary: { text: 'Sample Value Text' },
textSecondary: {
text: 'Secondary Value Text',
variant: TextVariant.BodyXSMedium,
color: TextColor.Success,
},
}}
/>
<KeyValueRowComponent
keyText={{
textPrimary: {
text: 'Sample Key Text',
tooltip: {
title: 'Sample Tooltip',
text: 'Quis sunt ullamco incididunt id ad. Magna deserunt quis aliqua non laborum nostrud exercitation adipisicing commodo.',
},
},
textSecondary: {
text: 'Secondary Key Text',
variant: TextVariant.BodySMMedium,
color: TextColor.Alternative,
},
}}
valueText={{
textPrimary: { text: 'Sample Value Text' },
textSecondary: {
text: 'Secondary Value Text',
variant: TextVariant.BodyXSMedium,
color: TextColor.Warning,
tooltip: {
title: 'Sample Tooltip',
text: 'Quis sunt ullamco incididunt id ad. Magna deserunt quis aliqua non laborum nostrud exercitation adipisicing commodo.',
size: TooltipSizes.Sm,
},
},
}}
/>
<KeyValueRowComponent
keyText={{
textPrimary: {
text: 'Sample Key Text',
tooltip: {
title: 'Sample Tooltip',
text: 'Quis sunt ullamco incididunt id ad. Magna deserunt quis aliqua non laborum nostrud exercitation adipisicing commodo.',
},
},
textSecondary: {
text: 'Secondary Key Text',
variant: TextVariant.BodySMMedium,
color: TextColor.Alternative,
},
}}
valueText={{
textPrimary: { text: 'Sample Value Text' },
textSecondary: {
text: 'Secondary Value Text',
icon: {
name: 'Ethereum Logo',
isIpfsGatewayCheckBypassed: true,
src: ethLogo,
},
},
}}
/>
</View>
</View>
),
};