aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/ComponentDecorations.tsx
blob: 64b8a8446afabc83b6e91b0c17cc256c49803ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { observer } from 'mobx-react';
import * as React from 'react';
import { SelectionManager } from '../util/SelectionManager';
import './ComponentDecorations.scss';

@observer
export class ComponentDecorations extends React.Component<{ boundsTop: number; boundsLeft: number }, { value: string }> {
    // eslint-disable-next-line no-use-before-define
    static Instance: ComponentDecorations;

    render() {
        const seldoc = SelectionManager.Views.lastElement();
        return seldoc?.ComponentView?.componentUI?.(this.props.boundsLeft, this.props.boundsTop) ?? null;
    }
}