Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (32 sloc) 1.05 KB

ThemeProvider

See the demo component here

Usage

Below, an example of using the ThemeProvider component:

import { ThemeProvider } from 'mdwrapper';
import App from './App';

const Demo = () => (
  <ThemeProvider
    background={'#f5f5f5'}
    error={'#f44336'}
    primary={'#2196f3'}
    secondary={'#ffeb3b'}
    surface={'#fafafa'}>
    <App />
  </ThemeProvider>
);

Props

List of all properties for the ThemeProvider component:

Prop Type Default Description
background string '#fff' BackGround Color
children object - Node Content
error string '#b00020' Error Color
onError string '#fff' On Error Color
onPrimary string '#fff' On Primary Color
onSecondary string '#000' On Secondary Color
onSurface string '#000' On Surface Color
primary string '#6200ee' Primary Color
secondary string '#018786' Secondary Color
surface string '#fff' Surface Color
You can’t perform that action at this time.