-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.tsx
More file actions
27 lines (23 loc) · 687 Bytes
/
Copy pathindex.tsx
File metadata and controls
27 lines (23 loc) · 687 Bytes
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
import React from 'react';
import {ScrollView} from 'react-native';
import {DefaultTextSizes, Text, Gap} from '@fast-base/native';
const values = Object.values(DefaultTextSizes);
const textStyle = (index: number) => ({
backgroundColor: index % 2 === 1 ? 'gray' : 'green',
});
const TextGapExample: React.FC = () => {
return (
<ScrollView>
<Gap space="xs">
{values.slice(0, values.length / 2).map((size: any, index) => {
return (
<Text style={textStyle(index)} key={`${size}-${index}`} size={size}>
Hello World
</Text>
);
})}
</Gap>
</ScrollView>
);
};
export default TextGapExample;