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

@cheapreats/react-ui

v2.4.54

Published

React UI library for CheaprEats

Downloads

454

Readme

CheaprEats UI Library

PR Requirements

  • Showcase Visual Layer through an Image on your Pull Request
  • Showcase Interactions / Animations Layer through a GIF / Video on your Pull Request
    • Macbook: Command+Shift+5
    • Windows: Snip Tool

Installation Requirements

Prettier: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

Getting Started

Storybook: https://storybook.js.org/

TypeScript: https://www.typescriptlang.org/

Atomic Design: https://atomicdesign.bradfrost.com/

This repository encompasses the Component Driven Design Methodology.

src/

This folder is where you will be building your UI, no-data-logic only components.

stories/

This folder is where you will be testing your UI on Storybook for different ViewPorts (Responsiveness), Accessibility and functionality.

.storybook/

This folder contains the Storybook configuration options

scripts/

This folder contains code generation scripts to help make development faster.

Helpful Resources

Need Icons

Use the Styled-Icons library to import icons from : https://styled-icons.dev/

Themes/

Contains all the styling that CheaprEats uses so you don't have to guess to color codes, Also your components will automatically translate to dark mode! To Add a Color to the Theme Modify both the MainTheme File and DarkTheme File (Add the Typing for the New Color as well as the Color Code for the new Color Key)

Mixins (Responsiveness)
  • Ensure that you are using the consistent Mixins for your Media Queries: https://github.com/cheapreats/react-ui-library/blob/v2/src/Themes/ThemeTemplate.ts#L138

When Importing/Using This Library (Try without this first as library has been fixed)

  • Ensure there is only one instance of react & react-dom being used in your app. Use Webpack alias to point to ./node_modules/react & ./node_modules/react-dom respectively. When you import this library there is the Version of React by the Library and the version of React by your app being used simutaneously. Even if they are the same versions, two copies of react/react-dom will cause issues. Point all instance of react/react-dom to the one used by your application using Webpack Aliases.
  resolve: {
    alias: {
      // add as many aliases as you like! 
      "react": "./node_modules/react",
      "react-dom": "./node_modules/react-dom"
    }
  }
  • Wrap you app with the Theme Object You need to import Global into your app and wrap your app with the Global to Access the Theme.
    return (
        <Global
            extend={
                JSON.parse(localStorage.getItem('isDark') ?? 'false')
                    ? extendThemeDark
                    : extendThemeMain
            }
            style={globalStyle}
            theme={ThemeTypes.MAIN}
        >
            <QueryClientProvider client={queryClient}>
                <Switch>
                    {getLandingRoutes()}
                    <Route path="/:id" component={Dashboard} />
                </Switch>
            </QueryClientProvider>
        </Global>
    );