diff --git a/example/src/copyAllCheckboxPlugin.js b/example/src/copyAllCheckboxPlugin.js index 83ca89ea..9ec18a1b 100644 --- a/example/src/copyAllCheckboxPlugin.js +++ b/example/src/copyAllCheckboxPlugin.js @@ -1,4 +1,17 @@ const markdownText = ` + ++ Selected third parties include: + - Service providers assigned to carrying out your service contract when placing a booking on the company. Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at + - Service providers assigned to carrying out your service contract when placing a booking on the company. Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at + - Service providers assigned to carrying out your service contract when placing a booking on the company. Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at + ++ Sub-lists are made by indenting 2 spaces: + - Marker character change forces new list start: + * Ac tristique libero volutpat at + + Facilisis in pretium nisl aliquet + - Nulla volutpat aliquam velit ++ Very easy! + ## ![loading](https://www.hippomundo.com/images/loading.gif) Images ![Minion](https://octodex.github.com/images/minion.png) diff --git a/package.json b/package.json index 2b3e9c60..383e7919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-markdown-renderer", - "version": "3.0.1", + "version": "3.0.2", "description": "Markdown renderer for react-native, with CommonMark spec support + adds syntax extensions & sugar (URL autolinking, typographer).", "main": "src/index.js", "scripts": {}, diff --git a/src/lib/enum/PlatformEnum.js b/src/lib/enum/PlatformEnum.js new file mode 100644 index 00000000..1e45c5e4 --- /dev/null +++ b/src/lib/enum/PlatformEnum.js @@ -0,0 +1,4 @@ +export default { + IOS: "ios", + ANDROID: "android" +}; diff --git a/src/lib/styles.js b/src/lib/styles.js index 23e35a97..66dc938b 100644 --- a/src/lib/styles.js +++ b/src/lib/styles.js @@ -1,4 +1,5 @@ -import { StyleSheet } from "react-native"; +import { Platform, StyleSheet } from "react-native"; +import PlatformEnum from "./enum/PlatformEnum"; /** * @@ -65,19 +66,28 @@ export const styles = StyleSheet.create({ }, list: {}, listItem: { + flex: 1, flexWrap: "wrap" // backgroundColor: 'green', }, listUnordered: {}, listUnorderedItem: { - flexDirection: "row" + flexDirection: "row", + justifyContent: "flex-start" }, listUnorderedItemIcon: { marginLeft: 10, marginRight: 10, - lineHeight: 40 + ...Platform.select({ + [PlatformEnum.IOS]: { + lineHeight: 36 + }, + [PlatformEnum.ANDROID]: { + lineHeight: 30 + } + }) }, listUnorderedItemText: { fontSize: 20, @@ -91,7 +101,14 @@ export const styles = StyleSheet.create({ listOrderedItemIcon: { marginLeft: 10, marginRight: 10, - lineHeight: 40 + ...Platform.select({ + [PlatformEnum.IOS]: { + lineHeight: 36 + }, + [PlatformEnum.ANDROID]: { + lineHeight: 30 + } + }) }, listOrderedItemText: { fontWeight: "bold", @@ -134,14 +151,13 @@ export const styles = StyleSheet.create({ textDecorationLine: "line-through" }, link: { - textDecorationLine: "underline", + textDecorationLine: "underline" }, u: { borderColor: "#000000", borderBottomWidth: 1 }, image: { - flex: 1, - + flex: 1 } });