@gechiui/icons
Version:
GeChiUI Icons package, based on dashicon.
31 lines (28 loc) • 711 B
JavaScript
/**
* GeChiUI dependencies
*/
import { cloneElement } from '@gechiui/element';
/** @typedef {{icon: JSX.Element, size?: number} & import('@gechiui/primitives').SVGProps} IconProps */
/**
* Return an SVG icon.
*
* @param {IconProps} props icon is the SVG component to render
* size is a number specifiying the icon size in pixels
* Other props will be passed to wrapped SVG component
*
* @return {JSX.Element} Icon component
*/
function Icon(_ref) {
let {
icon,
size = 24,
...props
} = _ref;
return cloneElement(icon, {
width: size,
height: size,
...props
});
}
export default Icon;
//# sourceMappingURL=index.js.map