Last active
January 24, 2019 09:16
-
-
Save andr3a88/96dcd09cd7e10a4b314db8543d9b4177 to your computer and use it in GitHub Desktop.
React native component for a separator 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 } from 'react-native'; | |
interface IProps { | |
color?: string; | |
marginTop?: number; | |
marginBottom?: number; | |
} | |
export class SeparatorLine extends React.Component<IProps, any> { | |
constructor(props: IProps) { | |
super(props); | |
} | |
render() { | |
return (<View style={{ | |
marginTop: this.props.marginTop || 10, | |
marginBottom: this.props.marginBottom || 10, | |
height: 1, | |
flex: 1, | |
backgroundColor: this.props.color || '#D1D1D6' | |
}} />); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment