Skip to content

Commit 05380c9

Browse files
committed
center bullets next to their list items
1 parent d86e53d commit 05380c9

File tree

1 file changed

+8
-7
lines changed
  • source/views/components/markdown

1 file changed

+8
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// @flow
22

33
import * as React from 'react'
4-
import {Text} from 'react-native'
5-
import glamorous from 'glamorous-native'
4+
import glamorous, {View, Text} from 'glamorous-native'
65
import {Paragraph} from './formatting'
76

87
// the list itself
9-
export const List = glamorous.view({})
8+
export const List = glamorous(View)({})
109

1110
// the list item's text
12-
export const ListText = glamorous(Paragraph)({})
11+
export const ListText = glamorous(Paragraph)({
12+
flex: 1,
13+
})
1314

1415
// the list item's container box thing
1516
type Props = {
@@ -19,10 +20,10 @@ type Props = {
1920
export class ListItem extends React.PureComponent<Props> {
2021
render() {
2122
return (
22-
<glamorous.View flexDirection="row">
23-
<Text></Text>
23+
<View alignItems="center" flexDirection="row">
24+
<Text paddingRight={4}></Text>
2425
<ListText {...this.props} />
25-
</glamorous.View>
26+
</View>
2627
)
2728
}
2829
}

0 commit comments

Comments
 (0)