Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.1 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.1 KB

Decentraland UI v2

This is basically Material UI themed with Decentrland's look & feel + some of our own components

See: ui2.decentraland.org

Usage

Install it:

npm install --save decentraland-ui2

Import Decentraland UI v2's theme styles in your App's entry point

In your main ReactDOM renderer import Theme Provider and the theme you want to use

// ./src/index.ts
...
import { dark, ThemeProvider } from 'decentraland-ui2/dist/theme';
...

      <ThemeProvider theme={dark}>
        ...
      </ThemeProvider>
...

Now you can use Decentraland UI v2's components:

import React from "react"
import { Button } from "decentraland-ui2/lib/@mui"

export const CustomButton = (props) => {
  return <Button {...props}>Save</Button>
}

Development

Prerequisites: Node.js 16 React 17|18 (or compatible)

Install dependencies and start Storybook:

$ npm install
$ npm run generate:storybooks //This will regenerate @MUI components
$ npm run start