1.0.5 • Published 3 years ago

@wniemiec-component-reactnative/weekday-selector v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm.io

❇ Introduction

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

🖼 Gallery

❓ 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

PropertyTypeDescriptionDefault
onPressfunction(number, bool): voidFunction that is called when a weekday is selectednull
reducedboolIndicates whether the days of the week should be displayed in abbreviated formfalse
selectedOpsarray: numberPre-selected weekdays (starting with 0)[]
bgColorstringBackground color (in hexadecimal)#01786F
fgColorstringForeground 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

/

NameTypeDescription
distDirectoryReleased versions
docsDirectoryDocumentation files
srcDirectorySource files