From 0c5f6e444547788dda4abdfd5d85c06eb1ffca5d Mon Sep 17 00:00:00 2001 From: ludovicm67 Date: Sun, 9 Feb 2020 12:53:20 +0100 Subject: [PATCH] webui: convert custom tags to TypeScript --- webui/src/tag/{ImageTag.js => ImageTag.tsx} | 5 ++++- webui/src/tag/{PreTag.js => PreTag.tsx} | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) rename webui/src/tag/{ImageTag.js => ImageTag.tsx} (80%) rename webui/src/tag/{PreTag.js => PreTag.tsx} (82%) diff --git a/webui/src/tag/ImageTag.js b/webui/src/tag/ImageTag.tsx similarity index 80% rename from webui/src/tag/ImageTag.js rename to webui/src/tag/ImageTag.tsx index b0f0c1c847ed771132f4696314d57e48f1dfa256..7c7d7e98488782501e497c15a1febc5adf565eae 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) => { const classes = useStyles(); return ( diff --git a/webui/src/tag/PreTag.js b/webui/src/tag/PreTag.tsx similarity index 82% rename from webui/src/tag/PreTag.js rename to webui/src/tag/PreTag.tsx index c2440df9b6324876d511f6de0cd7366f5d152dce..0199927713da4dd7788e6972fb7dd076863d254a 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) => { const classes = useStyles(); return
;
 };