Massive JavaScript cleanup

- Use JSX for templates
- Docblock/comment everything
- Mostly passes ESLint (still some work to do)
- Lots of renaming, refactoring, etc.

CSS hasn't been updated yet.
This commit is contained in:
Toby Zerner
2015-07-15 14:00:11 +09:30
parent 4480e0a83f
commit ab6c03c0cc
220 changed files with 9785 additions and 5919 deletions

View File

@ -1,3 +1,12 @@
export default function icon(icon) {
return m('i.fa.fa-fw.fa-'+icon)
/**
* The `icon` helper displays a FontAwesome icon. The fa-fw class is applied.
*
* @param {String} name The name of the icon class, without the `fa-` prefix.
* @param {Object} attrs Any other attributes to apply.
* @return {Object}
*/
export default function icon(name, attrs = {}) {
attrs.className = 'icon fa fa-fw fa-' + name + ' ' + (attrs.className || '');
return <i {...attrs}/>;
}