1
0
Fork 0
freesewing/packages/components
2019-04-19 17:31:44 +02:00
..
src 🚚 Post lerna init and import of packages 2019-04-19 08:37:33 +02:00
.editorconfig 🚚 Post lerna init and import of packages 2019-04-19 08:37:33 +02:00
.gitignore 🚚 Post lerna init and import of packages 2019-04-19 08:37:33 +02:00
.npmignore 🚚 Post lerna init and import of packages 2019-04-19 08:37:33 +02:00
LICENSE 🚚 Post lerna init and import of packages 2019-04-19 08:37:33 +02:00
package.json 🔧 Centrally confifured package and rollup files 2019-04-19 17:31:44 +02:00
README.md 🚚 Post lerna init and import of packages 2019-04-19 08:37:33 +02:00
rollup.config.js 🔧 Centrally confifured package and rollup files 2019-04-19 17:31:44 +02:00

Freesewing logo

 freesewing
a library for made-to-measure sewing patterns

Version License DeepScan grade Chat on Gitter Become a Patron

@freesewing/components

This is a Material UI theme that's used by the freesewing web sites.

Install

npm i --save @freesewing/components

Getting the theme

After installing @freesewing/components, import it:

import createTheme from "@freesewing/components";

The default export (createTheme in our example above) is a method that calls createMuiTheme under the hood. It takes a single argument, the theme name:

object createTheme(string themeName = "light")

If the name you pass it is dark you'll get the dark theme. Anything else, and you'll get the light theme.

Using the theme

To use this theme, you need to pass it as the theme prop to muiThemeProvider:

<MuiThemeProvider theme={createTheme(true)}>
  // ... your app here
</MuiThemeProvider>

See the Material-UI docs on themes for more details.