EQWorks / react-labs

react components laboratory
https://eqworks.github.io/react-labs
MIT License
4 stars 0 forks source link
meta-common meta-design

react-labs

Master

A React user interface kit built with Material-UI.

Installation

  1. Install react-labs (you can use either npm or Yarn):
npm i @eqworks/react-labs
  1. Install the required peer dependencies:
npm i @eqworks/lumen-ui @material-ui/core @material-ui/icons @material-ui/lab react react-dom

Usage

  1. Import the required react-slick CSS files:
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
  1. Wrap your application in a <ThemeProvider>:
import React from "react";
import ReactDOM from "react-dom";

import { ThemeProvider } from "@eqworks/react-labs";

import App from "./app";

ReactDOM.render(
  <ThemeProvider>
    <App />
  </ThemeProvider>,
  document.getElementById("root")
);
  1. Now you can start using react-labs components:
import { Button, Typography } from "@eqworks/react-labs";

const MyComponent = () => (
  <div>
    <Typography variant="h1">Hello world!</Typography>
    <Button type="primary">Click me!</Button>
  </div>
);

Note: You can override the react-labs default theme by passing a theme prop to <ThemeProvider>.
Click here to find out how to create your own theme using Material UI's createMuiTheme method.