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-css-calendar

v0.1.1

Published

**VooptyBusiness** in a set of management tools, developed for the education and fitness industries. https://www.voopty.com/ A crucial part of Voopty eco-system is Schedule Management. We developed lightweight and flexible calendar component which satisf

Downloads

6

Readme

VooptyBusiness in a set of management tools, developed for the education and fitness industries. https://www.voopty.com/ A crucial part of Voopty eco-system is Schedule Management. We developed lightweight and flexible calendar component which satisfies the most complicated needs of our clients

React css calendar by Voopty

Install:

npm install react-css-calendar

or

yarn add react-css-calendar

Example:

import React from 'react';
import {CalendarGrid} from 'react-css-calendar'
import moment from 'moment'

const SimpleExample = () => (
            <CalendarGrid events={[
                                      {
                                          title: 'voopty',
                                          start: moment.utc().set('hour', 8),
                                          end: moment.utc().set('hour', 9),
                                      },
                                      {
                                          title: 'calendar',
                                          start: moment.utc().set('hour', 8),
                                          end: moment.utc().set('hour', 10),
                                      },
                                      {
                                          title: 'says',
                                          start: moment.utc().set('hour', 9).set('minutes', 30),
                                          end: moment.utc().set('hour', 11),
                                      },
                                      {
                                          title: 'hello',
                                          start: moment.utc().set('hour', 12),
                                          end: moment.utc().set('hour', 14),
                                      }
                                  ]}/>
  )

Props:

Name | Type | Default | Description ------------ | -------------| -------------| ------------- startHour* | number | 0 | hour when vertical timeline begins endHour* | number | 24 | hour when vertical timeline ends events* | array | [] | calendar events to display. The order doesn't matter. Required fields of an event to be displayed correctly is {start: moment, end: moment} columns* | array | [moment.utc()] | calendar columns to render(doesn't have to be dates see example with custom grouping) renderTime* | (moment) => UIComponent | (date) => date.format('LT') | what to render on the timeline for each hour renderColumnName* | (column) => UIComponent | (date) => date.format('D MMM') | what to render for each calendar column renderEvent* | (event) => UIComponent | (event) => event.title | what to render for each calendar event dimensions* | { tenMinutesHeight: number, timeLineWidth: number, headerHeight: number, groupedEventsMargin: number } | { tenMinutesHeight: 20, timeLineWidth: 70, headerHeight: 50, groupedEventsMargin: 0 } | calendar dimentions constants colorScheme* | { background: color, divider: color, hover: color, header: color} | { background: '#fff', divider: '#DCDCDC', hover: '#E6E6E6', header: '#F5F5F5'} | calendar color settings getColumnDate* | (column) => moment | (date) => date | what date should be used to each column (see example with custom grouping) getColumnEvents* | (column, {events: array}) => array | (date, {events}) => (events.filter(({start, end}) =>moment(start).isSameOrBefore(date, 'day') && moment(end).isSameOrAfter(date, 'day'))) | return array of events to be displayed in the column onTimeSlotClick | (moment) => () | | how to handle click on empty timeslot

Use Cases:

Simple UI customization

https://www.voopty.com/studio/STUDIOTHEATREACTINGCONSERVATORY (Schedule section, switch to week view) Voopty Calendar Example

Columns are not days of the week

In the example, the date is fixed, but columns are represented by people who are teaching the class. Voopty Grouped Calendar Example For that we have to override default values of following props:

  • columns - an array of people who are teaching the classes during the fixed date
  • renderColumnName - display info about the person who is teaching the class
  • getColumnDate - return the fixed date for any column
  • getColumnEvents - return list of the events taught by the person in the column