1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/.jest/__mocks__/svgrMock.tsx
EnzoVezzaro 593039f894
Fix svgr in storybook & jest (#1428)
* fix svg loader

* added Logo component to be able to test storybook

* added svg mock for svgr as suggested (still not working)

* package cleanup

* make svg moduleNameMapper match first

* cleanup

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-05-16 17:11:43 +01:00

11 lines
264 B
TypeScript

import React, { SVGProps } from 'react'
const SvgrMock = React.forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
(props, ref) => <svg ref={ref} {...props} />
)
SvgrMock.displayName = 'SvgrMock'
export const ReactComponent = SvgrMock
export default SvgrMock