'use client'; import { observer } from 'mobx-react'; import { Component } from 'react'; import { Button } from '../../../source/Base/Button'; import { Icon } from '../../../source/Extension/Icon'; import { ClipboardModel } from './model'; export interface CopyCommandProps { children: string; } @observer export class CopyCommand extends Component { model = new ClipboardModel(); handleCopy = () => void this.model.copy(this.props.children); render() { const { children } = this.props; const { status } = this.model; return (
{children} {status === 'copied' ? 'Install command copied' : ''}
); } }