0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added typings for svg imports

refs https://github.com/TryGhost/Team/issues/3151

Using svg imports in React *.tsx files was throwing error as Module `*.svg` did not have any exported member as `ReactComponent`. This change updates the typings to declare the module with exported ReactComponent as an SVG element, allowing svg files to be imported normally.
This commit is contained in:
Rishabh 2023-05-25 18:26:53 +05:30
parent 2598097b36
commit 3520f7fe1c

View file

@ -1 +1,8 @@
declare module '@tryghost/timezone-data'
declare module '*.svg' {
import React = require('react');
export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
const src: string;
export default src;
}