@patreon/studio
Version:
Patreon Studio Design System
17 lines • 633 B
JSX
import React from 'react';
import { Icon as IconWrapper } from '../Icon';
// TODO (legacied import/no-default-export)
// This failure is legacied in and should be updated. DO NOT COPY.
// eslint-disable-next-line import/no-default-export
export default function withIcon(
// eslint-disable-next-line @typescript-eslint/naming-convention
IconSvg) {
return Object.assign(React.forwardRef(function Icon(props, ref) {
return (<IconWrapper innerRef={ref} {...props}>
<IconSvg />
</IconWrapper>);
}), {
iconName: IconSvg.displayName ?? IconSvg.name,
});
}
//# sourceMappingURL=withIcon.jsx.map