Mozilla Foundation's React component library. The peanut butter to mofo-bootstrap's jelly.
Перейти к файлу
Mozilla-GitHub-Standards 023abc08de Add Mozilla Code of Conduct (#72)
* Add Mozilla Code of Conduct file

Fixes #71.

_(Message COC002)_

* Update CODE_OF_CONDUCT.md
2019-04-19 16:01:49 -04:00
demo Adding theme switcher to demo (#29) 2016-08-05 17:12:49 -05:00
scripts adding autoprefixer to build process (#35) 2016-08-10 11:46:27 -05:00
src Upgrade to React 16 (#66) 2017-12-08 14:57:05 -08:00
.eslintrc.yaml adding eslint & travis (#23) 2016-07-22 14:05:50 -07:00
.gitignore removing `dist` (#19) 2016-07-21 14:03:45 -07:00
.npmignore removing `dist` (#19) 2016-07-21 14:03:45 -07:00
.sass-lint.yml Add Sass Linting (#47) 2016-11-21 14:37:37 +00:00
.travis.yml change the node version requirement for Travis (#46) 2016-10-26 09:22:20 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct (#72) 2019-04-19 16:01:49 -04:00
README.md Update README.md (#38) 2016-08-29 11:57:10 -07:00
deploy.js removing node git dep (#50) 2017-01-31 15:36:35 -08:00
package-lock.json 2.0.0 2017-12-08 14:57:31 -08:00
package.json 2.0.0 2017-12-08 14:57:31 -08:00
webpack.config.js Upgrade to React 16 (#66) 2017-12-08 14:57:05 -08:00

README.md

Uses Mofo Standards Build Status

mofo-ui

Mozilla Foundation React components.

Purpose

mofo-ui is a library of React UI components primarily for usage by the various Mozilla Foundation hubs. It's designed to complement mofo-bootstrap, but doesn't require it. It can also be used alongside stock Boostrap versions 3 and 4 or with no additional CSS framework.

Usage

In your target project, do the following:

  1. npm i mofo-ui --save
  2. Include the compiled CSS and JS located in dist in your app.
  3. If you're using Webpack, you can require mofo-ui and pick which components you want to use.

For example:

import { RadioFilter } from "mofo-ui";

<RadioFilter options={radioOptions} initialChoice={`foo`}></RadioFilter>

Development

Run the following commands in your terminal:

  1. git clone https://github.com/mozilla/mofo-ui.git
  2. cd mofo-ui
  3. npm start
  4. Navigate to http://127.0.0.1:1615 to view the demo page.

File Structure

├── demo <- A page with all components for dev and demo purposes
│   ├── css <- Compiled code. Don't edit.
│   ├── img <- Image assets for demo page.
│   ├── index.html <- Wrapper for demo.jsx injection
│   └── js <- Compiled code. Don't edit.
├── dist <- Compiled code. Don't edit.
├── src
│   ├── components <- All the mofo-ui library components
│   ├── demo.jsx <- JSX code for demo page
│   ├── exports.js <- Entry point for exported components.
│   └── main.scss
└── webpack.config.js

CSS Class Names

To reduce conflicts with other CSS, prefix all class names with mui- (eg: mui-tabs).