2022-10-27 10:58:17 +00:00
|
|
|
import { TableBody, TableCell, TableHead } from "@material-ui/core";
|
2020-05-14 09:30:32 +00:00
|
|
|
import EditableTableCell from "@saleor/components/EditableTableCell";
|
|
|
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
2022-10-27 10:58:17 +00:00
|
|
|
import TableRowLink from "@saleor/components/TableRowLink";
|
2019-06-19 14:40:52 +00:00
|
|
|
import { storiesOf } from "@storybook/react";
|
2019-08-09 10:26:22 +00:00
|
|
|
import React from "react";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
import CardDecorator from "../../CardDecorator";
|
|
|
|
import Decorator from "../../Decorator";
|
|
|
|
|
|
|
|
storiesOf("Generics / EditableTableCell", module)
|
|
|
|
.addDecorator(CardDecorator)
|
|
|
|
.addDecorator(Decorator)
|
|
|
|
.add("default", () => (
|
2019-11-04 14:25:23 +00:00
|
|
|
<ResponsiveTable>
|
2019-06-19 14:40:52 +00:00
|
|
|
<TableHead>
|
|
|
|
<TableCell>Some header</TableCell>
|
|
|
|
<TableCell>Some header</TableCell>
|
|
|
|
<TableCell>Some header</TableCell>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
2022-10-27 10:58:17 +00:00
|
|
|
<TableRowLink>
|
2019-06-19 14:40:52 +00:00
|
|
|
<TableCell>Some value</TableCell>
|
|
|
|
<EditableTableCell
|
|
|
|
value={"Some editable text"}
|
|
|
|
onConfirm={() => undefined}
|
|
|
|
/>
|
|
|
|
<TableCell>Some value</TableCell>
|
2022-10-27 10:58:17 +00:00
|
|
|
</TableRowLink>
|
2019-06-19 14:40:52 +00:00
|
|
|
</TableBody>
|
2019-11-04 14:25:23 +00:00
|
|
|
</ResponsiveTable>
|
2019-06-19 14:40:52 +00:00
|
|
|
));
|