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
331 B
JavaScript
Raw Normal View History

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