-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path1-responsive-elements.js
More file actions
45 lines (41 loc) · 1.36 KB
/
1-responsive-elements.js
File metadata and controls
45 lines (41 loc) · 1.36 KB
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
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Grid, Section, Block } from 'react-native-responsive-layout';
const styles = StyleSheet.create({
element: {
height: 100,
justifyContent: 'center',
},
});
export default () => (
<Grid>
<Section>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#c3defe' }]} />
</Block>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#b2d4fe' }]} />
</Block>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#a1cbfd' }]} />
</Block>
</Section>
<Section>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#2d8bfb' }]} />
</Block>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#1c81fb' }]} />
</Block>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#0b78fb' }]} />
</Block>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#0470f1' }]} />
</Block>
<Block xsSize="1/1" smSize="1/2">
<View style={[styles.element, { backgroundColor: '#0468e0' }]} />
</Block>
</Section>
</Grid>
);