2.0.1 • Published 3 years ago

@wniemiec-component-reactnative/month-picker v2.0.1

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

npm.io

❇ Introduction

React Native component that allows you to choose a month.

🖼 Gallery

❓ How to use

  1. Install the component
$ npm install --save @wniemiec-component-reactnative/month-picker
  1. Import the component
import MonthPicker from '@wniemiec-component-reactnative/month-picker';
  1. Use it
[...]

import React, { useState } from 'react';
import { View } from 'react';

[...]

const [selectedMonth, setSelectedMonth]  = useState(0);

[...]

<View style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center' }}>
  <MonthPicker 
	selectedMonth={selectedMonth} 
	setSelectedMonth={setSelectedMonth}
  />
</View>

[...]

📖 Documentation

PropertyTypeDescriptionDefault
selectedDaynumberMonth that will be centered in the selector-
setSelectedMonthfunction(void): voidFunction that changes the selected month after a month is selected in the selector-
bgColorstringBackground color (in hexadecimal)"#233287"
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
docsDirectoryDocumentation files
srcDirectorySource files