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

@observer
export class ComponentDecorations extends React.Component<{ boundsTop: number; boundsLeft: number }, { value: string }> {
    static Instance: ComponentDecorations;

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