0.2.1 • Published 6 months ago

@metalnethq/baremetal v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

BareMetal

A collection of simple React components built with TailwindCSS.

Installation

pnpm install @metalnethq/baremetal // PNPM
npm install @metalnethq/baremetal // NPM
yarn add @metalnethq/baremetal // Yarn

Demo

Peer Dependencies

This library has the following peer dependencies:

  • react
  • react-dom
  • tailwindcss

Setting up

  1. In your tailwind.config.js file, add the following:
module.exports = {
  // ...
  content: [
    // ...
    "./node_modules/@metalnethq/baremetal/**/*.{js,jsx}",
  ],
};
  1. Create theme.js/.ts file and add the theme object to it. Right now there are only have few customization. You can find them here. Then add following code to the tailwind config file:
import theme from "./theme";

export default {
  // ...
  content: [
    // ...
    "./node_modules/@metalnethq/baremetal/**/*.{js,jsx}",
  ],
  theme: {
    // ...
    extend: {
      // ...
      colors: {
        // ...
        bm_primary: theme.bm_primary,
        bm_secondary: theme.bm_secondary,
        bm_warning: theme.bm_warning,
        bm_success: theme.bm_success,
        bm_danger: theme.bm_danger,
        bm_info: theme.bm_info,
        bm_gray: theme.bm_gray,
        bm_light: theme.bm_light,
        bm_dark: theme.bm_dark,
        bm_border: theme.bm_border,
        bm_primary_text: theme.bm_primary_text,
      },
    },
  },
  // ...
};