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

calendar-widgets

v0.0.14

Published

Craft beautifully robust date components in React.

Downloads

10

Readme

calendar-widgets

Craft beautifully robust date components in React.

License: MIT Current bundle size: 9.29 kB

Getting Started

To begin, you'll want to add the calendar-widgets package to a new or existing React project.

# npm
npm install calendar-widgets

# yarn
yarn add calendar-widgets

# pnpm
pnpm add calendar-widgets

Examples

To help you get started, take a look at this simple implementation of a Calendar. Here we're overriding the default component used to display a particular date with our custom variation.

We're also passing an array of custom dates. When the custom date's date aligns with the date in our CustomDay component, we'll have access to that custom date.

import React from 'react';
import { Calendar } from 'calendar-widgets';
import 'calendar-widgets/styles/Calendar-grid.css';

/* defining an optional custom day component */
const CustomDay = ({date, customDate}) => (
  <div>
    <b>{date.getDate()}</b>
    {customDate?.name && <small>{customDate?.name}</small>}
  </div>
);

const App = () => {
  return (
    <Calendar 
      customDay={CustomDay}
      customDates={[
        {
          name: 'Lisa\'s Birthday',
          date: new Date(2023, 4, 10)
        }
        // ...
      ]}
    />
  )
};

Contributing

We'd be appreciative of bug reports/ fixes, and would gladly accept new proposals. If you'd like to contribute to an existing issue, kindly communicate through the designated ticket to avoid overlapping efforts. Check out the Open Issues and our Contributing Guide for more information.

If you're interested in maintainer-level stuff, we're using an agile workflow via GitHub Projects. Here's a link to our project..

Local Setup

This project requires Node.js and pnpm to be installed. If needed, you can install them from Node.js website and pnpm website.

Contributors Setup

  1. Fork this repository
  2. Clone the forked repository to your local machine, or open a new Code Space
  3. Checkout to a clean branch. e.g git checkout feature/addSomeCode (Please be more descriptive)
  4. Install the dependencies via pnpm install
  5. You're all set up. Run pnpm run build to run the production build and ensure everything is working. If not, please open an issue in https://github.com/9mbs/calendar-widgets/issues 🙂

Scripts

  • pnpm run build Run the build that we push to NPM
  • pnpm run dev Run the dev build that does not minify the code
  • pnpm run storybook Run Storybook for local development
  • pnpm run lint Run ESLint to catch errors
  • pnpm run lint:fix Run ESLint to catch auto-fix errors