$ npm install fxos-button
<fxos-button>normal button<fxos-button>
Add disabled
attribute to disable the button.
<fxos-button disabled>button disabled</fxos-button>
Button be used in conjunction with fxos-icons.
<fxos-button><i data-icon="back-light" aria-hidden="true"></i><span>Back</span></fxos-button>
<fxos-button><span>Forward</span><i data-icon="forward-light" aria-hidden="true"></i></fxos-button>
Remember to add aria-hidden="true"
when both icon and text existed for Accessibility. So the screen reader will read the button text and ignore the icon text.
Add circular
attribute to turn button into circular form.
<fxos-button circular><i data-icon="camera"></i></fxos-button>
- Accessibility (@yzen)
- Test Coverage
- Performance
- Visual/UX
- RTL
git clone https://github.com/fxos-components/fxos-button.git
cd fxos-button
npm install
(NPM3)npm start
- Ensure Firefox Nightly is installed on your machine.
- To run unit tests you need npm >= 3 installed.
$ npm install
$ npm run test-unit
If your would like tests to run on file change use:
$ npm run test-unit-dev
If your would like run integration tests, use:
$ export FIREFOX_NIGHTLY_BIN=/absolute/path/to/nightly/firefox-bin
$ npm run test-integration
Run lint check with command:
$ npm run test-lint