Finish admin permissions page and clean up everything

This commit is contained in:
Toby Zerner
2015-07-31 20:16:47 +09:30
parent 5706c71c86
commit fde7afd3e2
33 changed files with 766 additions and 291 deletions

View File

@ -20,17 +20,17 @@ export default class Badge extends Component {
const type = extract(attrs, 'type');
const iconName = extract(attrs, 'icon');
attrs.className = 'Badge Badge--' + type + ' ' + (attrs.className || '');
attrs.title = extract(attrs, 'label');
attrs.className = 'Badge ' + (type ? 'Badge--' + type : '') + ' ' + (attrs.className || '');
attrs.title = extract(attrs, 'label') || '';
// Give the badge a unique key so that when badges are displayed together,
// and then one is added/removed, Mithril will correctly redraw the series
// of badges.
attrs.key = attrs.className;
attrs.key = attrs.type;
return (
<span {...attrs}>
{iconName ? icon(iconName, {className: 'Badge-icon'}) : ''}
{iconName ? icon(iconName, {className: 'Badge-icon'}) : m.trust('&nbsp;')}
</span>
);
}