import * as React from "react"; import * as mobxReact from "mobx-react"; import * as mobx from "mobx"; import {sprintf} from "sprintf-js"; import {boundMethod} from "autobind-decorator"; import cn from "classnames"; import {If, For, When, Otherwise, Choose} from "tsx-control-statements/components"; class CmdStrCode extends React.Component<{cmdstr : string, onUse : () => void, onCopy : () => void, isCopied : boolean, fontSize : "normal" | "large", limitHeight : boolean}, {}> { @boundMethod handleUse(e : any) { e.stopPropagation(); if (this.props.onUse != null) { this.props.onUse() } } @boundMethod handleCopy(e : any) { e.stopPropagation(); if (this.props.onCopy != null) { this.props.onCopy(); } } render() { let {isCopied, cmdstr, fontSize, limitHeight} = this.props; return (
{cmdstr}