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

mario-product-card

v0.0.1

Published

This is a deploy test package I created while learning React with TypeScript. It's a pretty simple Product Card Package, using different component patterns to allow direct access to properties, styles, among other things, from the package. This project wa

Downloads

5

Readme

MA-Product-Card

This is a deploy test package I created while learning React with TypeScript. It's a pretty simple Product Card Package, using different component patterns to allow direct access to properties, styles, among other things, from the package. This project was made progressively, and as you can inspect from the GitHub repository, from the following branches I will explain.

LazyLoad (w/ React Router v6)

One of the initial points of the application, this branch has a simple app with and LazyLoad.

LazyLoad Nested (w/ React Router v6)

An updated version of the previous branch, now with nested routes.

Component Extend Styles (Compound Component Pattern)

This is the first component pattern I implemented, which follows a similar workflow as Material UI or Ionic. It presents these custom components as HOCs to allow certain flexibilities I later made use of, also allowing custom styles to be added as needed.

Component Control Props

This updated branch allows user to control properties and state of the component. This pattern is commonly used in forms (as in value, onChange, and other properties).

Component State Initializer

Lastly, the final branch is made following the State Initializer pattern. This pattern allows a quick way for the user to access every property they have control over.

Example

import { ProductCard, ProductImage, ProductTitle, ProductButtons } from 'ma-product-card';
<ProductCard product={product} initialValues={{count: 0, maxCount: 15}}>
    {
        ({}) => (
            <>
                <ProductImage />
                <ProductTitle />
                <ProductButtons />
            </>
        )
    }
</ProductCard>

Contributing

Pull requests are welcome, anything that can help me improve the project and, most importantly, continue learning. Thank you for your time.

Mario Abdala