6.1.0 • Published 3 years ago

@pxblue/react-themes v6.1.0

Weekly downloads
94
License
BSD-3-Clause
Repository
github
Last release
3 years ago

PX Blue themes for React applications

This package provides theming support for Eaton applications using the PX Blue design system. It includes resources for developers using React w/ Material UI version 4+ (prior versions of this package will work with Material UI version 3 - check the Changelog for details). This package comes with two theme options: a Blue theme (standard) and a Dark theme.

For other frameworks, check out our related packages:

Installation

Install with npm

npm install --save @pxblue/react-themes

or yarn

yarn add @pxblue/react-themes

Usage

To use these themes in your application, simply wrap the app in a ThemeProvider and pass in your desired theme (blue or blueDark). You'll also need to include the Open Sans font resources (included with the themes):

import {
    ThemeProvider,
    createMuiTheme
} from '@material-ui/core/styles';
import * as PXBlueThemes from '@pxblue/react-themes';
import "@pxblue/react-themes/open-sans";
...
<ThemeProvider theme={createMuiTheme(PXBlueThemes.blue)}>
    <App />
</ThemeProvider>

Updating From Version 5 ~> 6

In version 6, we have migrated from the deprecated typeface-open-sans package to @fontsource/open-sans (bundled with the PX Blue themes). You'll need to update your Open Sans import references in your root file:

Before:

require('typeface-open-sans');

After:

import '@pxblue/react-themes/open-sans';

Demo

View on Code Sandbox

6.1.0

3 years ago

6.0.0

3 years ago

6.0.0-beta.3

3 years ago

6.0.0-beta.2

3 years ago

6.0.0-beta.1

3 years ago

6.0.0-beta.0

3 years ago

5.0.3

3 years ago

5.0.2

4 years ago

5.0.2-beta.0

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

5.0.0-beta.0

4 years ago

4.0.0

4 years ago

4.0.0-alpha.0

4 years ago