@wniemiec-component-reactnative/month-picker

2.0.1 • Public • Published

Month picker

Month selector.

React Native compatibility Release License


Introduction

React Native component that allows you to choose a month.

🖼 Gallery

image 2

image 3

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

Property Type Description Default
selectedDay number Month that will be centered in the selector -
setSelectedMonth function(void): void Function that changes the selected month after a month is selected in the selector -
bgColor string Background color (in hexadecimal) "#233287"
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
docs Directory Documentation files
src Directory Source files

Package Sidebar

Install

npm i @wniemiec-component-reactnative/month-picker

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

120 kB

Total Files

17

Last publish

Collaborators

  • williamniemiec