{document && }
- {user && (
+ {user && readable && (
void }) => React.ReactNode;
+ disabled?: boolean;
+ render?: (arg: { isPublic: boolean; disabled: boolean; toggleVisible: (arg: boolean) => void }) => React.ReactNode;
}
const { Text } = Typography;
-export const DocumentShare: React.FC = ({ documentId, render }) => {
+export const DocumentShare: React.FC = ({ documentId, disabled = false, render }) => {
const [visible, toggleVisible] = useToggle(false);
const { data, loading, error, toggleStatus } = useDocumentDetail(documentId);
const [sharePassword, setSharePassword] = useState('');
@@ -34,9 +35,9 @@ export const DocumentShare: React.FC = ({ documentId, render }) => {
return (
<>
{render ? (
- render({ isPublic, toggleVisible })
+ render({ isPublic, disabled, toggleVisible })
) : (
-