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

@vespaiach/month-view

v0.1.3

Published

If you just need a quick calendar view by month for your React app, this piece of ui will help.

Downloads

7

Readme

Why

If you just need a quick calendar view by month for your React app, this piece of ui will help.

Usage

  1. Install package
npm i @vespaiach/month-view -S
  1. The gist
import '@vespaiach/month-view/dist/base.css'; // Tailwindcss's preflight. This is optional, but recommended
import '@vespaiach/month-view/dist/month.css';

import './app.css';

import * as React from 'react';

import { MonthView } from '@vespaiach/month-view';
import { MonthNum } from '@vespaiach/month-view/dist/type';

export default function App() {
    const [date, setDate] = React.useState(new Date());

    return (
        <MonthView year={date.getFullYear()} month={date.getMonth() as MonthNum} />
    );
}
  1. Properties

| Properties | Note | type | required | | ----------- | ------------------------------------------------ | ------------------------------------------------------- | -------- | | year | Year | number | yes | | month | Month (start from 0) | number | yes | | events | List of events will be displayed on the calendar | { title:string; start: Date; minutes: number}[] | no | | className | Css class | string | no | | onClick | Click event handler | (date: Date, events: Event[], evt: MouseEvent>) => void | no | | DAYS | Custom name of day (Sun, Mon...) | string[] | no | | MONTHS | Custom name of month (Jan, Feb...) | string[] | no | | colors | Custom color of calendar** | object[] | no |

**

    colors?: {
        gridLine?: string;
        sheetBackground?: string;
        dayText?: string;
        grayedOutText?: string;
        normalText?: string;
        lightText?: string;
        todayCircle?: string;
        eventListDot?: string;
    };

Development

This React component is bootstrapping with ViteJS, styling with Tailwindcss, testing with Vitest and building with Microbundle and Postcss.

NPM commands

  • To start development page: npm run dev
  • To test the lib: npm run test.
  • To build for production: npm run build.

Note

In fact, Microbundle can build css files too, but it automatically merges css files into one which also includes Tailwindcss's preflight set, and that may not what users want. Tailwindcss's preflight set should be excluded and let users decide to add it in their project whether or not. So let Postcss takes the job of building css instead.

License

MIT