0.1.2 • Published 7 years ago

material-ui-background v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

material-ui-background

A background react element based on material-ui.

Build Status

Installation

Install material-ui-background.

npm install material-ui-background

Then install its peer dependencies, if you haven't already:

npm install react material-ui

Usage

Provide a background color through the MuiThemeProvider. Then use the Background component as a generic background for your app.

import { getMuiTheme, lightBaseTheme, MuiThemeProvider } from 'material-ui/styles';
import Background, { appendMuiBackground, dark, light } from 'material-ui-background';
import React from 'react';
import { render } from 'react-dom';


const color = light; // or dark


render(
  <MuiThemeProvider theme={appendMuiBackground(getMuiTheme(lightBaseTheme), color)}>
    <Background />
  </MuiThemeProvider>,
  document.getElementById('root'),
)

License

MIT