Skip to content

Instantly share code, notes, and snippets.

@sturmenta
Last active August 29, 2019 22:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturmenta/8fc74afb88b9a36125dfc8dd8a47437d to your computer and use it in GitHub Desktop.
Save sturmenta/8fc74afb88b9a36125dfc8dd8a47437d to your computer and use it in GitHub Desktop.
react native - android - dotted line
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