cal.pub0.org/packages/app-store/office365video/components/InstallAppButton.tsx

21 lines
504 B
TypeScript
Raw Normal View History

import { useState } from "react";
import type { InstallAppButtonProps } from "../../types";
import AddIntegration from "./AccountDialog";
export default function InstallAppButton(props: InstallAppButtonProps) {
const [isModalOpen, setIsModalOpen] = useState(false);
return (
<>
{props.render({
onClick() {
setIsModalOpen(true);
},
disabled: isModalOpen,
})}
<AddIntegration open={isModalOpen} onOpenChange={setIsModalOpen} />
</>
);
}