blob: 3b5aac221d5b71904fd4a93c250922e35cea43e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import { observer } from "mobx-react";
import * as React from "react";
import { AclPrivate, Doc, DocListCast } from "../../../../fields/Doc";
import { GetEffectiveAcl } from "../../../../fields/util";
import { emptyFunction, returnFalse, setupMoveUpEvents } from "../../../../Utils";
import { DragManager } from "../../../util/DragManager";
import "./FontIconBadge.scss";
interface FontIconBadgeProps {
value: string | undefined;
}
@observer
export class FontIconBadge extends React.Component<FontIconBadgeProps> {
_notifsRef = React.createRef<HTMLDivElement>();
// onPointerDown = (e: React.PointerEvent) => {
// setupMoveUpEvents(this, e,
// (e: PointerEvent) => {
// const dragData = new DragManager.DocumentDragData([this.props.collection!]);
// DragManager.StartDocumentDrag([this._notifsRef.current!], dragData, e.x, e.y);
// return true;
// },
// returnFalse, emptyFunction, false);
// }
render() {
if (this.props.value === undefined) return (null);
return <div className="fontIconBadge-container" ref={this._notifsRef}>
<div className="fontIconBadge" style={{ "display": "initial" }}
// onPointerDown={this.onPointerDown}
>
{this.props.value}
</div>
</div>;
}
}
|