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

@zopauk/react-components

v5.71.6

Published

Shared react styled components for all the Zopa projects.

Downloads

6,319

Readme

React components

CI/CD code style: prettier semantic-release Commitizen friendly Dependencies - Always up to date

Shared react styled components for all the Zopa projects.

This repo contains 2 things at the same time:

  • The Typescript library for the react components

  • Documentation for the components managed with React-styleguidist

Check the docs 💕

Migrating from version 3

There are a number of breaking changes which will need to be addressed when upgrading from Zopa React Components v3 to v4.

The migration guide will walk you through the major changes such as colours and typography.

Installation

git clone https://github.com/zopaUK/react-components.git
pnpm i

Local linking

Local linking with Next.js applications can be particularly challenging due to the way Next.js handles module resolution and its own optimization processes. When attempting to link local packages, such as react-components, with a Next.js application, developers might encounter issues related to module resolution, duplicate React instances, or unexpected behavior in hot module reloading (HMR).

To mitigate these issues, you can use pnpm dev:zrc.

Follow these steps:

  1. In the react-components directory, run the following command to start the watcher:
pnpm dev:zrc
  1. In the application directory, run the following command to link the react-components library (if it exists):
pnpm dev:zrc

Now, any changes made in the react-components codebase will be reflected in the linked application after a delay (~500ms).

NOTE: It is named "zrc" (specifically) to allow the developer to run the same command on both projects.

Running the project

Execute the development environment:

pnpm dev

The docs will run at localhost:6060.

Local development (working on a linked application)

We start a watcher using esbuild and tsc by running:

pnpm dev:code

Your locally running app will have its own way of linking to local dependencies but making changes in react-components codebase should now show in the application.

Motivation

The aim of this project is to share with the frontend community how we code in Zopa.

We think it might be useful for someone who wants to start a new react components library and want to re-use some of our code.

Types

You can access typings for specific components under @zopauk/react-components/types:

import { Button } from '@zopauk/react-components';
import { IButtonProps } from '@zopauk/react-components/types/components/atoms/Button';

To inspect the folder structure within @zopauk/react-components/types you can run yarn compile:types and navigate the generated types/ folder in the project root.

Contributing

In case you want to contribute to this library, please have a look at our contributing guidelines 🙌🏼

Contributors

License

This repository is MIT-licensed.

Trade marks

No permission is granted to use the trade names, trade marks, service marks, or product names of Zopa, except as required for reasonable and customary use in describing the origin of this library and reproducing the content of the notice in the license.

Fonts

Zopa uses Open Sans in its sites and applications. If you want to make use of this font outside of Zopa, you will need to license it directly from Google Fonts.