This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/packages/dashboard-v2/src/components/Icons/withIconProps.js

20 lines
379 B
JavaScript

import PropTypes from "prop-types";
const propTypes = {
/**
* Size of the icon's bounding box.
*/
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
};
const defaultProps = {
size: 32,
};
export const withIconProps = (IconComponent) => {
IconComponent.propTypes = propTypes;
IconComponent.defaultProps = defaultProps;
return IconComponent;
};