From b8756ab420ddfe12bdba341e59fe4003feb7a816 Mon Sep 17 00:00:00 2001 From: Atul R Date: Thu, 22 Aug 2019 23:07:17 +0200 Subject: [PATCH] adds workaround for images --- extras.d.ts | 1 + src/index.tsx | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 extras.d.ts diff --git a/extras.d.ts b/extras.d.ts new file mode 100644 index 0000000..947020f --- /dev/null +++ b/extras.d.ts @@ -0,0 +1 @@ +declare module "*.jpg"; diff --git a/src/index.tsx b/src/index.tsx index 89477b3..658f520 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,18 +8,17 @@ import { useEventHandler } from "@nodegui/react-nodegui"; import React, { useState } from "react"; -import { AspectRatioMode } from "@nodegui/nodegui"; -//@ts-ignore +import { AspectRatioMode, QPushButtonEvents } from "@nodegui/nodegui"; + import imageUrl from "../assets/sample.jpg"; const fixedSize = { width: 500, height: 500 }; const App = () => { const [time, setTime] = useState(new Date()); const btnHandler = useEventHandler( - { clicked: () => setTime(new Date()) }, + { [QPushButtonEvents.clicked]: () => setTime(new Date()) }, [] ); - console.log(imageUrl); return (