2016-08-08 11:18:21 +09:00
|
|
|
import Telescope from 'meteor/nova:lib';
|
2016-03-30 09:24:52 +09:00
|
|
|
import React from 'react';
|
|
|
|
|
2016-03-21 10:27:43 +09:00
|
|
|
const Icon = ({ name, iconClass }) => {
|
|
|
|
const icons = Telescope.utils.icons;
|
|
|
|
const iconCode = !!icons[name] ? icons[name] : name;
|
|
|
|
iconClass = (typeof iconClass === 'string') ? ' '+iconClass : '';
|
|
|
|
const c = 'icon fa fa-fw fa-' + iconCode + ' icon-' + name + iconClass;
|
|
|
|
return <i className={c} aria-hidden="true"></i>;
|
|
|
|
}
|
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
Icon.displayName = "Icon";
|
|
|
|
|
2016-03-21 10:27:43 +09:00
|
|
|
module.exports = Icon;
|
|
|
|
export default Icon;
|