Divider
Divider component render a separator that can separate two components horizontally and vertically.
Implementation code
import { StyledView, StyledText, Divider } from 'rn-nativeflow';
const Component = () => {
return (
<StyledView gap={20}>
<StyledText primary>Item 1</StyledText>
<Divider />
<StyledText primary>Item 2</StyledText>
</StyledView>
<StyledView gap={20} flexDirection='row'>
<StyledText primary>Item 1</StyledText>
<Divider />
<StyledText primary>Item 2</StyledText>
</StyledView>
);
}
export default Component;
Props
Prop | Type | Default | Description |
---|---|---|---|
thickness | number | 0.2 | It sets the thickness of the border |
color | string | It sets color of the divider | |
style | object | Helps to change the styles of the divider |