Skip to content
Snippets Groups Projects
Commit 6a25be89 authored by Alexander Madsen's avatar Alexander Madsen
Browse files

Moved HostTable story to own directory

parent 5e4d65f2
No related branches found
No related tags found
1 merge request!254ICSHWI-11707 - Move stories to separate directory
This commit is part of merge request !254. Comments created here will be created in the context of that merge request.
import React from "react";
import { mount } from "@cypress/react";
import { composeStories } from "@storybook/testing-react";
import * as stories from "./HostTable.stories";
import * as stories from "../../stories/components/common/host/HostTable.stories";
const { Populated } = composeStories(stories);
const textColumns = ["host", "description", "network", "scope", "device type"];
......
import React from "react";
import { Container } from "@material-ui/core";
import hosts from "../../mocks/fixtures/PagedCSEntryHostResponse.json";
import { HostTable } from "./HostTable";
import { RouterHarness } from "../../mocks/AppHarness";
import hosts from "../../../../mocks/fixtures/PagedCSEntryHostResponse.json";
import { HostTable } from "../../../../components/host/HostTable";
import { RouterHarness } from "../../../../mocks/AppHarness";
import { disabledTable } from "../../../utils/common-args";
export default {
title: "Host/HostTable",
component: HostTable
argTypes: {
hosts: disabledTable,
totalCount: disabledTable,
rowsPerPage: disabledTable,
lazyParams: disabledTable,
columnSort: disabledTable,
setLazyParams: disabledTable,
setColumnSort: disabledTable
}
};
const Template = (args) => (
......@@ -17,7 +26,8 @@ const Template = (args) => (
</RouterHarness>
);
export const Empty = Template.bind({});
export const Empty = (args) => <Template {...args} />;
Empty.args = {
loading: false,
hosts: [],
......@@ -29,12 +39,23 @@ Empty.args = {
setColumnSort: () => {}
};
export const EmptyLoading = Template.bind({});
EmptyLoading.args = { ...Empty.args, loading: true };
export const EmptyLoading = (args) => <Template {...args} />;
EmptyLoading.args = {
...Empty.args,
loading: true
};
export const Populated = (args) => <Template {...args} />;
export const Populated = Template.bind({});
Populated.args = {
...Empty.args,
totalCount: hosts.totalCount,
hosts: hosts.csEntryHosts
};
Populated.argTypes = {
totalCount: disabledTable,
hosts: disabledTable,
loading: disabledTable
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment