|
| 1 | +import * as React from "react"; |
| 2 | + |
| 3 | +import { Meta, StoryFn } from "@storybook/react"; |
| 4 | + |
| 5 | +import CompareTableComponent from "../../view/compare/CompareTable"; |
| 6 | + |
| 7 | +import "../../view/results/resultsView.css"; |
| 8 | + |
| 9 | +export default { |
| 10 | + title: "Compare/Compare Table", |
| 11 | + component: CompareTableComponent, |
| 12 | +} as Meta<typeof CompareTableComponent>; |
| 13 | + |
| 14 | +const Template: StoryFn<typeof CompareTableComponent> = (args) => ( |
| 15 | + <CompareTableComponent {...args} /> |
| 16 | +); |
| 17 | + |
| 18 | +export const CompareTable = Template.bind({}); |
| 19 | +CompareTable.args = { |
| 20 | + comparison: { |
| 21 | + t: "setComparisons", |
| 22 | + stats: { |
| 23 | + fromQuery: { |
| 24 | + name: "Query built from user-controlled sources", |
| 25 | + status: "finished in 0 seconds", |
| 26 | + time: "8/16/2023, 3:08:37 PM", |
| 27 | + }, |
| 28 | + toQuery: { |
| 29 | + name: "Query built from user-controlled sources", |
| 30 | + status: "finished in 2 seconds", |
| 31 | + time: "8/16/2023, 3:07:21 PM", |
| 32 | + }, |
| 33 | + }, |
| 34 | + columns: [ |
| 35 | + { name: "a", kind: "e" }, |
| 36 | + { name: "b", kind: "e" }, |
| 37 | + ], |
| 38 | + commonResultSetNames: ["edges", "nodes", "subpaths", "#select"], |
| 39 | + currentResultSetName: "edges", |
| 40 | + rows: { |
| 41 | + from: [], |
| 42 | + to: [ |
| 43 | + [ |
| 44 | + { |
| 45 | + label: "url : String", |
| 46 | + url: { |
| 47 | + uri: "file:/home/runner/work/sql2o-example/sql2o-example/src/main/java/org/example/HelloController.java", |
| 48 | + startLine: 22, |
| 49 | + startColumn: 27, |
| 50 | + endLine: 22, |
| 51 | + endColumn: 57, |
| 52 | + }, |
| 53 | + }, |
| 54 | + { |
| 55 | + label: "url", |
| 56 | + url: { |
| 57 | + uri: "file:/home/runner/work/sql2o-example/sql2o-example/src/main/java/org/example/HelloController.java", |
| 58 | + startLine: 23, |
| 59 | + startColumn: 33, |
| 60 | + endLine: 23, |
| 61 | + endColumn: 35, |
| 62 | + }, |
| 63 | + }, |
| 64 | + ], |
| 65 | + ], |
| 66 | + }, |
| 67 | + message: undefined, |
| 68 | + databaseUri: "file:///java", |
| 69 | + }, |
| 70 | +}; |
0 commit comments