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-calendar/themed

v0.3.0

Published

Checkout the documentation for this library at [React Calendar](https://reactcalendar.netlify.com)

Downloads

3

Readme

React Calendar Themed

Checkout the documentation for this library at React Calendar

Getting Started

This library provides many useful components that integrate the Theme UI library and the @react-calendar/core library together. The main thing this library provides is components that can be easily dropped into the core library but also have theme-ui variants to make it easy to style your calendar in a way that is consistent to your site or app's overal theme.

Installing

NPM

npm install --save @react-calendar/themed theme-ui react react-dom

Yarn

yarn add @react-calendar/themed theme-ui react react-dom

Optional (But helpful)

While it's not required to use this library but date-fns is really useful in conjunction with this one.

yarn add date-fns 

Example

import React, { useState } from 'react'
import { ThemeProvider } from 'theme-ui'
import { addMonths } from 'date-fns'
import { 
  SimpleEvent, 
  SimpleCalendar,
  base as myTheme
} from '@react-calendar/themed'

export function MyCalendar(): JSX.Element {
  const [currentMonth, setCurrentMonth] = useState(new Date(2020, 3, 1))

  const events: SimpleEvent[] = [
    {
      id: 1,
      title: 'First Event',
      interval: {
        start: new Date(2020, 3, 2),
        end: new Date(2020, 3, 5),
      },
    },
    {
      id: 2,
      title: 'This event spans two weeks',
      interval: {
        start: new Date(2020, 3, 10),
        end: new Date(2020, 3, 14),
      },
    },
    {
      id: 3,
      title: 'Overlapping Event',
      interval: {
        start: new Date(2020, 3, 13),
        end: new Date(2020, 3, 15),
      },
    },
    {
      id: 4,
      title: 'Other event',
      interval: {
        start: new Date(2020, 3, 14),
        end: new Date(2020, 3, 16),
      },
    },
  ]

  return (
    <ThemeProvider theme={myTheme}>
      <SimpleCalendar
        currentMonth={currentMonth}
        events={events}
        nextMonth={(): void => setCurrentMonth(m => addMonths(m, 1))}
        prevMonth={(): void => setCurrentMonth(m => addMonths(m, -1))}
      />
    </ThemeProvider>
  )
}