md-components
Installation
$ npm install --save md-components
Usage
/js/index.js
Component { return <Shell title='my app'> <div>hello world</div> </Shell> } ReactDOM
/css/index.scss
;
Fonts
The 'Roboto' font must be provided separetely and is not part of the package, e.g.:
;
Custom colors / Theming
md-components uses six colors:
- primary
- primary dark
- primary light
- accent
- acent dark
- accent light
The font color can be either "White" or "Black" and must be specified for each color respectively. Your main sass file might look like this:
; /* provide your custom colors */;; ;; ;; ;; ;; ;; ;;
The Google material color package provides convenient access to the "official" google color palette:
;; /* provide your custom colors */;; ;; ;; ;; ;; ;; ;;
Development
- You have to link
md-components
into the./examples
folder. You cannot use a relative path from./examples
to the./src
sincecreate-react-app
will throw an error.$ cd examples && npm link ../ && cd ..
- To start "compilation" while watching for changes run
$ npm run dev
- Run the examples project which uses all components
$ npm run examples
IE11
If you want to support IE11, you need to supply an Array.prototype.findIndex
polyfill with babel-polyfill or core-js. E.g with core-js:
npm i core-js --save
// your entry point e.g. index.js
More Documents
- Google Material Design
- use Sass
- follow SUIT CSS guidelines
- Webpack, module bundler.
New release
$ np