mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-26 19:47:30 +00:00
Avoid awkward Typescript literal
This commit is contained in:
parent
378d858aa2
commit
b1674094db
1 changed files with 2 additions and 3 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue