decentraland-ui2
v0.7.2
Published
Decentraland's UI components and styles
Downloads
1,258
Maintainers
Readme
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