BlueRain OS
  • Introduction
  • API
    • API Reference
  • Guides
    • Apps
      • Installation
      • Creating an App
      • Configuration
    • Components
      • Registering Components
      • Extending Components
      • Replacing Components
      • Accessing Raw Components
      • Components & HoCs
    • Filters
      • Known Filters
    • Plugins
      • Installation
      • Configuration
      • Creating a Plugin
  • Miscellaneous
    • JSON to React
  • Plugins
    • Apollo
    • Internationalization
    • Material UI
    • React Router
    • Redux
    • Redux Devtools
    • Why Did You Update
Powered by GitBook
On this page
  • Usage
  • Components
  • Filters
  • material-ui.theme
  • API
  • MaterialUiPlugin
  1. Plugins

Material UI

PreviousInternationalizationNextReact Router

Last updated 6 years ago

Adds theme Provider to BlueRain.

Usage

Run the following command in the plugin directoy:

npm i --save @blueeast/bluerain-plugin-material-ui

Then in your boot function, pass the plugin like this:

import BR from '@blueeast/bluerain-os';
import MaterialUiPlugin from '@blueeast/bluerain-plugin-material-ui';

BR.boot({
    plugins: [MaterialUiPlugin]
})

Components

None.

Filters

This plugin provides complete flexibility to modify the material ui theme. This is done by providing various filter hooks.

material-ui.theme

This hook gives the ability to modify the plugin configurations.

Parameters:

Name

Type

Description

theme

Object

Custom Theme

Returns:

Name

Type

Description

theme

Object

Custom Theme

Example:

This example customizes the theme to make the AppBar color red.

import BR from '@blueeast/bluerain-os';

BR.Filters.add(
    'material-ui.theme',
    function CustomTheme(theme) {
        return Object.assign({}, theme, {
            appBar: {
                color: 'red'
            }
        })
    }
);

API

MaterialUiPlugin

Extends Plugin

Material UI Plugin

Properties

pluginName "MaterialUiPlugin"

slug "material-ui"

Material UI
string
string