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-component-library-parcel

v1.0.3

Published

A reusable React component library bundled with Parcel.

Downloads

6

Readme

React Component Library with Parcel

A reusable React component library bundled with Parcel.

Table of Contents

Installation

To install the library, use npm or yarn:

npm install react-component-library-parcel

or

yarn add react-component-library-parcel

Usage

Here is a basic example of how to use a component from the library:

import React from 'react';
import { MyComponent } from 'react-component-library-parcel';

const App = () => (
  <div>
    <MyComponent />
  </div>
);

export default App;

Advanced Usage

import React from 'react';
import { ThemeProvider } from 'styled-components';
import { NotificationProvider } from 'react-component-library-parcel';
import { ModalProvider } from 'react-component-library-parcel';
import type { HTMLAttributes } from 'react';
import type { Styled } from 'styled-components';
import { css, useTheme } from 'styled-components';
import styled from 'styled-components';
import type { CssFunction, StyleVariants } from 'react-component-library-parcel/styled';
import { opacity } from 'react-component-library-parcel/utilities';
import { Font, FontType, Article, Heading, Paragraph, Quote, Mono, Notification } from 'react-component-library-parcel';

const App = () => (
    <ThemeProvider theme={theme}>
        <NotificationProvider>
            <ModalProvider>
                <Font>Font</Font>
            </ModalProvider>
        </NotificationProvider>
    </ThemeProvider>
);

export default App;

Components

Ariatext

The Ariatext component provides accessible text for screen readers.

Button

The Button component is a customizable button.

Font

The Font component is highly customizable and can be used to render different types of text elements.

Props

  • type (FontType): The type of font. Options include heading, paragraph, quote, mono, default.
  • level (FontLevels): The level of the font, affecting its size. Options are 1, 2, or 3.
  • semibold (boolean): If true, renders the text in semibold.
  • bold (boolean): If true, renders the text in bold.
  • italic (boolean): If true, renders the text in italic.
  • inputCss (CssFunction): Additional CSS styles to apply.

Icons

The Icons component provides a set of customizable icons.

Modal

The Modal component is used to display modal dialogs.

Notification

The Notification component displays notifications.

Portal

The Portal component is used for rendering children into a DOM node that exists outside the DOM hierarchy of the parent component.

StateContext

The StateContext component provides a context for managing state.

TextField

The TextField component is a customizable input field.

Providers

ThemeProvider

Wrap your application with ThemeProvider to apply themes.

NotificationProvider

Wrap your application with NotificationProvider to enable notifications.

ModalProvider

Wrap your application with ModalProvider to manage modals.

Contributing

We welcome contributions to this project. To get started:

  1. Fork the repository.
  2. Clone your forked repository.
  3. Create a new branch for your feature or bugfix.
  4. Make your changes.
  5. Submit a pull request.

Please make sure to update tests as appropriate.

License

This project is licensed under the MIT License. See the LICENSE file for details.