Last active
August 29, 2019 22:26
-
-
Save sturmenta/8fc74afb88b9a36125dfc8dd8a47437d to your computer and use it in GitHub Desktop.
react native - android - dotted line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { View, Text, StyleSheet } from 'react-native'; | |
const styles = StyleSheet.create({ | |
container: { | |
width: '100%', | |
alignItems: 'center', | |
height: 1, | |
marginBottom: 10, | |
marginTop: 10, | |
}, | |
subContainer: { | |
width: '100%', | |
height: 10, | |
}, | |
text: { top: -6, fontSize: 8 }, | |
}); | |
const DottedLine = ({ color }) => ( | |
<View style={styles.container}> | |
<View style={styles.subContainer}> | |
<Text style={[styles.text, { color }]}>{Array.from({ length: 100 }).map(() => '- ')}</Text> | |
</View> | |
</View> | |
); | |
export default DottedLine; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment