import { observer } from "mobx-react" ; import * as React from "react" ; import { lazyInject } from "../../inversify.config" ; import CityBuilderStore from "../../stores/CityBuilderStore" ; import TopBarShareButton from "./TopBarShareButton" ; @ observer export default class TopBarMenu extends React . Component < Record < string , unknown > , any > { @ lazyInject ( "CityBuilderStore" ) private readonly cityBuilderStore ! : CityBuilderStore ; public render ( ) { return ( < div className = "top-bar-menu" > < TopBarShareButton disabled = { this . cityBuilderStore . show } /> < button id = "options-button" className = "right" onClick = { this . showBuilder . bind ( this ) } disabled = { this . cityBuilderStore . show } > Options < /button> < /div>); } private showBuilder ( ) { this . cityBuilderStore . show = true ; } }