bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/icon/component.jsx
2016-05-20 10:37:19 -03:00

27 lines
589 B
JavaScript

import React, { Component, PropTypes } from 'react';
import cx from 'classnames';
const propTypes = {
iconName: PropTypes.string.isRequired,
prependIconName: PropTypes.string,
};
const defaultProps = {
prependIconName: 'icon-bbb-',
};
export default class Icon extends Component {
render() {
const { className, prependIconName, iconName, ...otherProps } = this.props;
return (
<i
className={cx(className, [prependIconName, iconName].join(''))}
{...otherProps}>
</i>
);
}
}
Icon.propTypes = propTypes;
Icon.defaultProps = defaultProps;