2021-02-28 20:02:31 +00:00
|
|
|
import React, { useState } from "react";
|
2020-10-06 19:51:21 +00:00
|
|
|
import { Meta } from "@storybook/react";
|
|
|
|
|
2021-02-28 20:02:31 +00:00
|
|
|
import { DownloadDialog } from "../components/download-dialog/DownloadDialog";
|
2020-12-04 18:58:28 +00:00
|
|
|
import { MockAdminClient } from "./MockAdminClient";
|
2020-10-06 19:51:21 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
title: "Download Dialog",
|
|
|
|
component: DownloadDialog,
|
|
|
|
} as Meta;
|
|
|
|
|
|
|
|
const Test = () => {
|
2021-02-28 20:02:31 +00:00
|
|
|
const [open, setOpen] = useState(false);
|
|
|
|
const toggle = () => setOpen(!open);
|
|
|
|
|
2020-10-06 19:51:21 +00:00
|
|
|
return (
|
2021-02-28 20:02:31 +00:00
|
|
|
<MockAdminClient
|
|
|
|
mock={{ clients: { getInstallationProviders: () => '{some: "json"}' } }}
|
|
|
|
>
|
|
|
|
<button id="show" onClick={toggle}>
|
|
|
|
Show
|
|
|
|
</button>
|
|
|
|
<DownloadDialog
|
|
|
|
id="58577281-7af7-410c-a085-61ff3040be6d"
|
|
|
|
open={open}
|
|
|
|
toggleDialog={toggle}
|
|
|
|
/>
|
|
|
|
</MockAdminClient>
|
2020-10-06 19:51:21 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Show = () => <Test />;
|