@dtribe/react-components
TypeScript icon, indicating that this package has built-in type declarations

1.8.4 • Public • Published

PoolTogether React Tailwind UI Components

React UI components using tailwindcss

Components:

Component Groups

Top level components

Installation:

yarn add @dtribe/pooltogether-react-components

Usage

Required:

// tailwind.config.js
const pooltogetherTheme = require("@dtribe/pooltogether-react-components");
module.exports = pooltogetherTheme({
  purge: [],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
});
// _app.jsx
import "@dtribe/pooltogether-react-components/dist/index.css";

Now you can use any components you want:

import React from "react";
import { Button } from "@dtribe/pooltogether-react-components";

<Button type="submit">Submit</Button>;

// -------------------

import React from "react";
import Link from "next/link";
import { ButtonLink } from "@dtribe/pooltogether-react-components";

// External links
<ButtonLink href={href}>View</ButtonLink>
// Internal links
<Link as={'/home'} href={'/home'}><ButtonLink>Home</ButtonLink></Link>

Local development (yalc)

In pooltogether-react-components: yalc publish

In the app you're importing pooltogether-react-components: yalc add @dtribe/react-components

Local development (yarn)

TODO: Make this better...

In pooltogether-react-components: yarn link

In the app you're importing pooltogether-react-components: yarn link-components

In pooltogether-react-components: yarn link-local yarn start

In the app you're importing pooltogether-react-components: yarn dev

And your app will hot reload when changes are detected in the components folder!

Testing

  • yarn test will run jest

TODO:

  • integrate prettier/husky with our default prettier config
  • copy unit tests over and get them running in this lib

Package Sidebar

Install

npm i @dtribe/react-components

Weekly Downloads

2

Version

1.8.4

License

MIT

Unpacked Size

17.2 MB

Total Files

399

Last publish

Collaborators

  • dtribe150