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:
parent
2598097b36
commit
3520f7fe1c
1 changed files with 7 additions and 0 deletions
7
ghost/admin-x-settings/src/typings.d.ts
vendored
7
ghost/admin-x-settings/src/typings.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue