bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/icon/component.jsx
Oleksandr Zhurbenko 251bd22738 PR review fixes
2017-09-06 12:36:52 -07:00

28 lines
611 B
JavaScript

import React, { Component } from 'react';
import PropTypes from 'prop-types';
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}
/>
);
}
}
Icon.propTypes = propTypes;
Icon.defaultProps = defaultProps;