15 lines
335 B
TypeScript
15 lines
335 B
TypeScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import getIcon from './getIcon';
|
|
|
|
const Icon = ({ name, ...otherProps }) => {
|
|
return <React.Fragment>{getIcon(name, { ...otherProps })}</React.Fragment>;
|
|
};
|
|
|
|
Icon.propTypes = {
|
|
name: PropTypes.string.isRequired,
|
|
className: PropTypes.string,
|
|
};
|
|
|
|
export default Icon;
|