diff options
author | ludovicm67 <ludovicmuller1@gmail.com> | 2020-02-09 12:53:20 +0100 |
---|---|---|
committer | Quentin Gliech <quentingliech@gmail.com> | 2020-02-11 20:54:37 +0100 |
commit | 0c5f6e444547788dda4abdfd5d85c06eb1ffca5d (patch) | |
tree | f35658159586448da0654485a698bf2ce7dee430 /webui | |
parent | 022f510369688084af5bcf314a97fd332d7ee265 (diff) | |
download | git-bug-0c5f6e444547788dda4abdfd5d85c06eb1ffca5d.tar.gz |
webui: convert custom tags to TypeScript
Diffstat (limited to 'webui')
-rw-r--r-- | webui/src/tag/ImageTag.tsx (renamed from webui/src/tag/ImageTag.js) | 5 | ||||
-rw-r--r-- | webui/src/tag/PreTag.tsx (renamed from webui/src/tag/PreTag.js) | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/webui/src/tag/ImageTag.js b/webui/src/tag/ImageTag.tsx index b0f0c1c8..7c7d7e98 100644 --- a/webui/src/tag/ImageTag.js +++ b/webui/src/tag/ImageTag.tsx @@ -7,7 +7,10 @@ const useStyles = makeStyles({ }, }); -const ImageTag = ({ alt, ...props }) => { +const ImageTag = ({ + alt, + ...props +}: React.ImgHTMLAttributes<HTMLImageElement>) => { const classes = useStyles(); return ( <a href={props.src} target="_blank" rel="noopener noreferrer nofollow"> diff --git a/webui/src/tag/PreTag.js b/webui/src/tag/PreTag.tsx index c2440df9..01999277 100644 --- a/webui/src/tag/PreTag.js +++ b/webui/src/tag/PreTag.tsx @@ -8,7 +8,7 @@ const useStyles = makeStyles({ }, }); -const PreTag = props => { +const PreTag = (props: React.HTMLProps<HTMLPreElement>) => { const classes = useStyles(); return <pre className={classes.tag} {...props}></pre>; }; |