<fxos-button>
Installation
$ npm install fxos-button
Examples
Usage
<fxos-button>normal button<fxos-button>
disable
Add disabled
attribute to disable the button.
<fxos-button disabled>button disabled</fxos-button>
With icon
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.
Circular
Add circular
attribute to turn button into circular form.
<fxos-button circular><i data-icon="camera"></i></fxos-button>
Readiness
Developing locally
git clone https://github.com/fxos-components/fxos-button.git
cd fxos-button
npm install
(NPM3)npm start
Tests
- 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
Lint check
Run lint check with command:
$ npm run test-lint