1.0.2 • Published 3 years ago

danger-calendar v1.0.2

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

danger-calendar

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save danger-calendar

Usage

import React from 'react'

import Calendar from 'danger-calendar'
import 'danger-calendar/dist/index.css'

const Example = () => {
  const events = [
    {
      date: '2020-11-22 00:00:00',
      title: 'Happy Birthday',
      description: '',
      color: '#8e44ad'
    },
    {
      date: '2020-11-18 00:00:00',
      title: 'Meeting',
      description: '',
      color: '#27ae60'
    }
  ]
  return (
    <Calendar
      onClick={(value) => console.log(value)}
      onDoubleClick={(value) => console.log(value)}
      events={events}
      iso={false}
    />
  )
}

Props

PropertyTypeValuesDescriptionDefault
onClickFunctionTrigger function and returns a click event with a date after click
onDoubleCLickFunctionTrigger function and returns a click event with a date after double click
isoBooleantrue falseChanges calendar format to ISO 8601 (ISO 8601 starts in monday)false

License

MIT ©

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago