Skip to content

Commit 3c8c9d6

Browse files
committed
test serde
1 parent c701eb7 commit 3c8c9d6

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

packages/app/src/Sidebar.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,26 @@ const styles = StyleSheet.create({
2222
container: {
2323
position: 'absolute',
2424
left: 40,
25-
top: 100,
25+
// top: 100,
2626
borderRadius: 10,
2727
lineHeight: 40,
28+
backgroundColor: 'orange'
2829
},
2930
});
3031

3132
class Item extends React.Component {
3233
render() {
33-
const { focused, text, setFocus } = this.props;
34+
const { focused, idx, text, setFocus } = this.props;
3435
console.log('focusableitem', setFocus, focused);
3536
return (
36-
<Text style={{
37-
color: focused ? '#331A00' : 'white',
38-
fontSize: 24
39-
}}>
40-
{text}
41-
</Text>
37+
<View style={{...styles.container, top: idx}}>
38+
<Text style={{
39+
color: focused ? '#331A00' : 'white',
40+
fontSize: 24
41+
}}>
42+
{text}
43+
</Text>
44+
</View>
4245
);
4346
}
4447
}
@@ -53,20 +56,23 @@ class Sidebar extends Component {
5356
render() {
5457
return (
5558
<View style={styles.sidebar}>
56-
<View style={styles.container}>
59+
{/*<View style={styles.container}>*/}
5760
<FocusableItem
5861
focusKey="sidebar-item-1"
5962
text="Rio de Janeiro"
63+
idx={120}
6064
/>
6165
<FocusableItem
6266
focusKey="sidebar-item-2"
6367
text="Kyoto"
68+
idx={160}
6469
/>
6570
<FocusableItem
6671
focusKey="sidebar-item-3"
6772
text="Stockholm"
73+
idx={200}
6874
/>
69-
</View>
75+
{/*</View>*/}
7076
</View>
7177
);
7278
}

0 commit comments

Comments
 (0)