npm.io
1.0.5 • Published 5 years ago

@wniemiec-component-reactnative/weekday-selector

Licence
MIT
Version
1.0.5
Deps
1
Size
165 kB
Vulns
0
Weekly
0

Weekday selector

Component that lets you select days of the week.

React Native compatibility Release License


Introduction

React Native component that lets you select days of the week.

image 3
image 1image 2image 4

How to use

  1. Install the component
$ npm install --save @wniemiec-component-reactnative/weekday-selector
  1. Import the component
import WeekdaySelector from '@wniemiec-component-reactnative/weekday-selector';
  1. Use it
[...]
function handleWeekDay(weekday, selected) {
  if (selected)
    alert('You selected: ' + weekday);
  else
    alert('You deselected: ' + weekday);
}

<WeekdaySelector 
  onPress={handleWeekDay}
/>
[...]

Documentation

Property Type Description Default
onPress function(number, bool): void Function that is called when a weekday is selected null
reduced bool Indicates whether the days of the week should be displayed in abbreviated form false
selectedOps array: number Pre-selected weekdays (starting with 0) []
bgColor string Background color (in hexadecimal) #01786F
fgColor string Foreground color (in hexadecimal) #FFFFFF

Changelog

Details about each version are documented in the releases section.

Contribute!

See the documentation on how you can contribute to the project here.

Files

/
Name Type Description
dist Directory Released versions
docs Directory Documentation files
src Directory Source files

Keywords