Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

A background react element based on material-ui

License

Notifications You must be signed in to change notification settings

appsemble/material-ui-background

Repository files navigation

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

About

A background react element based on material-ui

Resources

License

Stars

Watchers

Forks

Packages

No packages published