From b1674094dbf38d94a6cfb900e4554ceb0d748a93 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 25 Sep 2018 07:25:15 -0700 Subject: [PATCH] Avoid awkward Typescript literal --- js/components/ContextMenu.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/components/ContextMenu.tsx b/js/components/ContextMenu.tsx index 8faa183c..a4ae01c8 100644 --- a/js/components/ContextMenu.tsx +++ b/js/components/ContextMenu.tsx @@ -33,11 +33,10 @@ class Portal extends React.Component { } render() { - const style = { + const style: React.CSSProperties = { top: this.props.top, left: this.props.left, - // WTF Typescript. There's got to be a better way. - position: "absolute" as "absolute" + position: "absolute" }; return createPortal(
{this.props.children}
,