Avoid awkward Typescript literal

This commit is contained in:
Jordan Eldredge 2018-09-25 07:25:15 -07:00
parent 378d858aa2
commit b1674094db

View file

@ -33,11 +33,10 @@ class Portal extends React.Component<PortalProps> {
}
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(
<div style={style}>{this.props.children}</div>,