Update collection permissions UI (#6917)

This commit is contained in:
Tom Moor
2024-05-16 19:45:09 -04:00
committed by GitHub
parent 728c68be58
commit cae013837b
34 changed files with 1088 additions and 287 deletions

View File

@@ -6,11 +6,12 @@ import { usePopoverState, PopoverDisclosure } from "reakit/Popover";
import Document from "~/models/Document";
import Button from "~/components/Button";
import Popover from "~/components/Popover";
import SharePopover from "~/components/Sharing";
import SharePopover from "~/components/Sharing/Document";
import useCurrentTeam from "~/hooks/useCurrentTeam";
import useStores from "~/hooks/useStores";
type Props = {
/** Document being shared */
document: Document;
};
@@ -32,15 +33,13 @@ function ShareButton({ document }: Props) {
unstable_fixed: true,
});
const icon = isPubliclyShared ? <GlobeIcon /> : undefined;
return (
<>
<PopoverDisclosure {...popover}>
{(props) => (
<Button
icon={isPubliclyShared ? <GlobeIcon /> : undefined}
neutral
{...props}
>
<Button icon={icon} neutral {...props}>
{t("Share")} {domain && <>&middot; {domain}</>}
</Button>
)}