Skip to content

Commit

Permalink
List and Page Rule
Browse files Browse the repository at this point in the history
  • Loading branch information
maany committed Oct 17, 2023
1 parent 2875be1 commit 1d46c8f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/component-library/Demos/03_2_List_Rules.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Meta, StoryObj } from "@storybook/react";
import { fixtureRuleViewModel, mockUseComDOM } from "test/fixtures/table-fixtures";
import { ListRule as CR} from "../Pages/Rule/ListRule";

export default {
title: 'Demos/04_ListRules',
component: CR,
} as Meta<typeof CR>;

type Story = StoryObj<typeof CR>

export const CreateRule: Story = {
args: {
comdom: mockUseComDOM(Array.from({length: 100}, () => fixtureRuleViewModel()))
}
}

21 changes: 21 additions & 0 deletions src/component-library/Demos/03_3_Page_Rule.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { RulePageLockEntryViewModel } from "@/lib/infrastructure/data/view-model/rule";
import { Meta, StoryObj } from "@storybook/react";
import { fixtureRuleMetaViewModel, fixtureRulePageLockEntryViewModel, fixtureRuleViewModel, mockUseComDOM } from "test/fixtures/table-fixtures";
import { PageRule as PR} from "../Pages/Rule/PageRule";

export default {
title: 'Demos/05_PageRule',
component: PR,
} as Meta<typeof PR>;

type Story = StoryObj<typeof PR>

export const PageRule: Story = {
args: {
ruleMeta: fixtureRuleMetaViewModel(),
ruleLocks: mockUseComDOM<RulePageLockEntryViewModel>(Array.from({length: 100}, () => fixtureRulePageLockEntryViewModel())),
ruleBoostFunc: () => {console.log("boosted rule")},
ruleBoostShow: true,
}
}

1 change: 1 addition & 0 deletions src/component-library/Pages/Rule/CreateRule.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ CreateRule.args = {
},
rseListComDOM: mockUseComDOM(Array.from({ length: 100 }, () => fixtureRSEAccountUsageLimitViewModel())),
}

0 comments on commit 1d46c8f

Please sign in to comment.