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.
2022-02-18 08:20:47 +00:00
|
|
|
import PropTypes from "prop-types";
|
2022-02-17 11:53:32 +00:00
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
/**
|
|
|
|
* Size of the icon's bounding box.
|
|
|
|
*/
|
2022-03-07 09:55:43 +00:00
|
|
|
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
2022-02-18 08:20:47 +00:00
|
|
|
};
|
2022-02-17 11:53:32 +00:00
|
|
|
|
|
|
|
const defaultProps = {
|
|
|
|
size: 32,
|
2022-02-18 08:20:47 +00:00
|
|
|
};
|
2022-02-17 11:53:32 +00:00
|
|
|
|
|
|
|
export const withIconProps = (IconComponent) => {
|
2022-02-18 08:20:47 +00:00
|
|
|
IconComponent.propTypes = propTypes;
|
|
|
|
IconComponent.defaultProps = defaultProps;
|
2022-02-17 11:53:32 +00:00
|
|
|
|
2022-02-18 08:20:47 +00:00
|
|
|
return IconComponent;
|
|
|
|
};
|