Skip to content

Instantly share code, notes, and snippets.

@andr3a88
Last active January 24, 2019 09:16
Show Gist options
  • Save andr3a88/96dcd09cd7e10a4b314db8543d9b4177 to your computer and use it in GitHub Desktop.
Save andr3a88/96dcd09cd7e10a4b314db8543d9b4177 to your computer and use it in GitHub Desktop.
React native component for a separator line
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