npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-styled-component-calendar

v1.4.0

Published

## Installation

Downloads

9

Readme

React Styled Component Calendar

Installation

yarn add react-styled-component-calendar

or

npm install --save react-styled-component-calendar

Usage

import Calendar from 'react-styled-component-calendar'

const events = [{
    "title": "Two Volcano Sprint",
    "startDate": "2020-10-18T05:30+01:00",
    "endDate": "2020-10-24T00:00+00:00"
  }, {
    "title": "Silk Road Mountain Race",
    "startDate": "2020-08-14T00:00+00:00",
    "endDate": "2020-08-21T00:00+00:00"
  }, {
    "title": "Transcontinental No.8",
    "startDate": "2020-07-25T00:00+00:00",
    "endDate": "2020-08-01T00:00+00:00"
  }, {
    "title": "TransIbérica",
    "startDate": "2020-07-12T22:00+01:00",
    "endDate": "2020-07-26T22:00+01:00"
  }, {
    "title": "Transpyrenees",
    "startDate": "2020-06-27T21:00+01:00",
		"endDate": "2020-07-03T21:00+01:00"
	}, {
    "title": "GBDURO20",
    "startDate": "2020-06-27T08:00+00:00",
    "endDate": "2020-07-04T00:00+00:00"
  }, {
    "title": "Tour Divide",
    "startDate": "2020-06-12T08:00-07:00",
    "endDate": "2020-07-10T00:00+00:00"
  }, {
    "title": "Trans America Bike Race",
    "startDate": "2020-06-07T06:00-08:00",
		"endDate": "2020-06-20T18:00-05:00"
	}
}]

<Calendar events={events}>

Props

| prop | type | required | description | | ------------------------------ | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | events | array | * | array of events to pass to the calendar, so below for format of event | | dateInView | string | | the current date to be displayed. JavaScript new Date() object. n.b month index starts at 0 | | navMonthFormat | string | | moment js month format | | navYearsBeforeNow | number | | number of years to show before current year | | navYearsAfterNow | number | | number of years to show before current year | | outOfMonthCalendarDayHighlight | string | | cell hightlight for days outside of visible month | | todayColorHightight | string | | cell highlight for today | | onPrevMonthClick | function | | (month: number) => {} A function that is fired after month change containing the new month | | onNextMonthClick | function | | (month: number) => {} A function that is fired after month change containing the new month | | CalendarCellRenderer | function | | ({ index: number, events:Event[] }): React.FC<{}> => null; Full override function that returns a Calendar Cell Component. All other Cell props will be ignored | | MonthNavRenderer | function | | (): React.FC<{}> => {} Function that returns the month nav component | | WeekHeaderRenderer | function | | ({ days: string[] }}): React.FC<{}> => {} Function that returns the week nav component |

Event

| attribute | required | type | description | | ------------- | ------------ | -------- | ---------------------------------------------------------------- | | title | * | string | Title to render for given range | | startDate | * | DateTime | start date | | endDate | * | DateTime | | ...props | | any | any other values you would like to use in a custom calender cell |