From 9fe149571b482b275486904a84d6850e04b16a90 Mon Sep 17 00:00:00 2001 From: James Rogers Date: Fri, 11 Sep 2020 14:02:30 -0700 Subject: [PATCH] add types and default props --- src/Magnifier.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Magnifier.tsx b/src/Magnifier.tsx index 8b00086..61af755 100644 --- a/src/Magnifier.tsx +++ b/src/Magnifier.tsx @@ -2,7 +2,7 @@ import "./style.scss"; import debounce from "lodash.debounce"; import throttle from "lodash.throttle"; -import React, { PureComponent } from "react"; +import React, { CSSProperties, PureComponent } from "react"; type mgShape = "circle" | "square"; @@ -12,6 +12,8 @@ interface Props { width: string | number; height: string | number; className: string; + alt: string | undefined; + style: CSSProperties | undefined; // Zoom image zoomImgSrc: string; @@ -53,6 +55,8 @@ export default class Magnifier extends PureComponent { width: "100%", height: "auto", className: "", + alt: undefined, + style: undefined, // Zoom image zoomImgSrc: "",