mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
19 lines
478 B
JavaScript
19 lines
478 B
JavaScript
import React from 'react';
|
|
import classnames from 'classnames';
|
|
import PropTypes from 'prop-types';
|
|
|
|
export default function IconWithLabel({ icon, label, className }) {
|
|
return (
|
|
<div className={classnames('icon-with-label', className)}>
|
|
{icon}
|
|
{label ? <span className="icon-with-label__label">{label}</span> : null}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
IconWithLabel.propTypes = {
|
|
icon: PropTypes.node.isRequired,
|
|
className: PropTypes.string,
|
|
label: PropTypes.string,
|
|
};
|