aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/ComponentDecorations.tsx
blob: 929b549e0d6a1119fa1c7ad87513e5bda079b4c7 (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 './ComponentDecorations.scss';
import { DocumentView } from './nodes/DocumentView';

@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 = DocumentView.Selected().lastElement();
        return seldoc?.ComponentView?.componentUI?.(this.props.boundsLeft, this.props.boundsTop) ?? null;
    }
}