0.1.5 • Published 2 years ago

react-mjho-picker v0.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-mjho-picker

Installation

Run the following command to install this package.

npm install react-mjho-picker

Configuration

The most basic use of the Pickers can be described with:

import React, { useState } from "react";
import { DatePicker, TimePicker, ColorPicker } from "react-mjho-picker";

const Example = () => {
  const [date, setDate] = useState(new Date());
  const [time, setTime] = useState(new Date());
  const [color, setColor] = useState('#ff0000');
  return (
    <DatePicker value={date} onChange={date => setDate(date)} />
    <TimePicker value={time} onChange={time => setTime(time)} />
    <ColorPicker value={coloe} onChange={color => setColor(color)} />
  );
};

Demo

Online Demo is here!