Skip to content

Commit 6e689e5

Browse files
committed
fixed styling in default renderFunctions and style
1 parent f7b7aa0 commit 6e689e5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/defaultRenderFunctions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const defaultRenderFunctions = {
138138
if (AstRenderer.hasParents(parents, 'ul')) {
139139
return (
140140
<View key={AstRenderer.getUniqueID()} style={markdownStyles.listUnorderedItem}>
141-
<Text style={{ marginLeft: -10, marginRight: 10, lineHeight: 40 }}>
141+
<Text style={markdownStyles.listUnorderedItemIcon}>
142142
{'\u00B7'}
143143
</Text>
144144
<View style={[markdownStyles.listItem]}>
@@ -151,8 +151,8 @@ const defaultRenderFunctions = {
151151
if (AstRenderer.hasParents(parents, 'ol')) {
152152
return (
153153
<View key={AstRenderer.getUniqueID()} style={markdownStyles.listOrderedItem}>
154-
<Text style={{ width: 20, lineHeight: 40 }}>
155-
{node.index + 1}
154+
<Text style={markdownStyles.listOrderedItemIcon}>
155+
{node.index + 1} !
156156
</Text>
157157
<View style={[markdownStyles.listItem]}>
158158
{children}

lib/style.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,18 @@ export const markdownStyles = StyleSheet.create({
5151
listUnorderedItem: {
5252
flexDirection: 'row',
5353
},
54+
55+
listUnorderedItemIcon: { marginLeft: 10, marginRight: 10, lineHeight: 40 },
5456
listUnorderedItemText: {
5557
fontSize: 20,
5658
lineHeight: 20,
5759
},
5860

5961
listOrdered: {},
60-
listOrderedItem: {},
62+
listOrderedItem: {
63+
flexDirection: 'row',
64+
},
65+
listOrderedItemIcon: { marginLeft: 10, marginRight: 10, lineHeight: 40 },
6166
listOrderedItemText: {
6267
fontWeight: 'bold',
6368
lineHeight: 20,
@@ -85,8 +90,7 @@ export const markdownStyles = StyleSheet.create({
8590
},
8691
tableHeaderCell: {
8792
flex: 1,
88-
color: '#000000',
89-
fontWeight: 'bold',
93+
// color: '#000000',
9094
padding: 5,
9195
// backgroundColor: 'green',
9296
},

0 commit comments

Comments
 (0)