2.0.4 • Published 5 years ago

mainam-react-native-dash-view v2.0.4

Weekly downloads
7
License
ISC
Repository
-
Last release
5 years ago

mainam-react-native-dash-view

NPM version

A super simple <Dash /> component for react-native to draw customisable dashed lines

Installation

npm i --save mainam-react-native-dash-view

Props

namedesctypedefault
styleDash container styleView.PropTypes.Style{flexDirection = 'row'}
dashGapGap between two dashesnumber2
dashLengthLength of each dashnumber4
dashThicknessThickness of each dashnumber2
dashColorColor of each dashstringblack
dashStyleDashes styleView.PropTypes.Style{}
  • ProTip 1: Use flexDirection in style to get horizontal or vertical dashes. By default, it's row
  • ProTip 2: Use {borderRadius: 100, overflow: 'hidden'} in dashStyle to get rounded dotes instead of straight line dashes.

Usage

import Dash from 'mainam-react-native-dash-view';

//draws a horizontal dashed line with defaults. Also works with flex
render() {
    return <Dash style={{width:100, height:1}}/>
}

//draws a vertical dashed line with defaults.
render() {
    return <Dash style={{width:1, height:100, flexDirection:'column'}}/>
}

Dependenies

react-native-measureme

Development

PRs highly appreciated

License

MIT License

2.0.4

5 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago