diff options
| author | geireann <geireann.lindfield@gmail.com> | 2021-08-31 15:04:22 -0400 |
|---|---|---|
| committer | geireann <geireann.lindfield@gmail.com> | 2021-08-31 15:04:22 -0400 |
| commit | ef630d51e6407f303992e0672fb110a1009e5223 (patch) | |
| tree | 205a62ae796e6c877f6bf071444aa8e4cf76955c /src/client/views/nodes/button/FontIconBadge.tsx | |
| parent | 59458f5c11e7e0891391da65a54269a56c5c71b6 (diff) | |
| parent | 84c077d9a99212ea4018b1b37dc5d9d7a9d04ce1 (diff) | |
Merge branch 'menu_updates_geireann' of https://github.com/brown-dash/Dash-Web into menu_updates_geireann
Diffstat (limited to 'src/client/views/nodes/button/FontIconBadge.tsx')
| -rw-r--r-- | src/client/views/nodes/button/FontIconBadge.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/button/FontIconBadge.tsx b/src/client/views/nodes/button/FontIconBadge.tsx index 3e451eea6..cf86b5e07 100644 --- a/src/client/views/nodes/button/FontIconBadge.tsx +++ b/src/client/views/nodes/button/FontIconBadge.tsx @@ -1,9 +1,10 @@ import { observer } from "mobx-react"; -import React from "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 { collection: Doc | undefined; @@ -26,7 +27,7 @@ export class FontIconBadge extends React.Component<FontIconBadgeProps> { render() { if (!(this.props.collection instanceof Doc)) return (null); const length = DocListCast(this.props.collection.data).filter(d => GetEffectiveAcl(d) !== AclPrivate).length; // Object.keys(d).length).length; // filter out any documents that we can't read - return <div className="fontIconBadge-container" style={{ width: 15, height: 15, top: 12 }} ref={this._notifsRef}> + return <div className="fontIconBadge-container" ref={this._notifsRef}> <div className="fontIconBadge" style={length > 0 ? { "display": "initial" } : { "display": "none" }} onPointerDown={this.onPointerDown} > {length} |
