Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 754 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 754 Bytes

React Component Library

📚 React based component library

Installation

npm i @sagarhani/component-library react react-dom styled-components styled-system

or

yarn add @sagarhani/component-library react react-dom styled-components styled-system

Set up Provider

For Component library to work correctly, you need to set up the ThemeProvider at the root of your application.

Go to the root of your application and do this:

import * as React from 'react';

// 1. import `ThemeProvider` component
import { ThemeProvider } from '@sagarhani/component-library';

function App({ Component }) {
  // 2. Use at the root of your app
  return (
    <ThemeProvider>
      <Component />
    </ThemeProvider>
  );
}