Skip to content

Commit 609af06

Browse files
committed
Format
1 parent 3f7e0aa commit 609af06

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

site/src/components/PaginationWidget/PaginationWidget.stories.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ export default {
77
component: PaginationWidget,
88
argTypes: {
99
prevLabel: {
10-
defaultValue: "Previous"
10+
defaultValue: "Previous",
1111
},
1212
nextLabel: {
13-
defaultValue: "Next"
13+
defaultValue: "Next",
1414
},
1515
paginationRef: {
16-
defaultValue: createPaginationRef({ page: 1, limit: 12 })
16+
defaultValue: createPaginationRef({ page: 1, limit: 12 }),
1717
},
1818
numRecords: {
19-
defaultValue: 200
20-
}
21-
}
19+
defaultValue: 200,
20+
},
21+
},
2222
}
2323

2424
const Template: Story<PaginationWidgetProps> = (
@@ -27,7 +27,7 @@ const Template: Story<PaginationWidgetProps> = (
2727

2828
export const UnknownPageNumbers = Template.bind({})
2929
UnknownPageNumbers.args = {
30-
numRecords: undefined
30+
numRecords: undefined,
3131
}
3232

3333
export const LessThan8Pages = Template.bind({})
@@ -39,15 +39,15 @@ export const MoreThan8Pages = Template.bind({})
3939

4040
export const MoreThan7PagesWithActivePageCloseToStart = Template.bind({})
4141
MoreThan7PagesWithActivePageCloseToStart.args = {
42-
paginationRef: createPaginationRef({ page: 2, limit: 12 })
42+
paginationRef: createPaginationRef({ page: 2, limit: 12 }),
4343
}
4444

4545
export const MoreThan7PagesWithActivePageFarFromBoundaries = Template.bind({})
4646
MoreThan7PagesWithActivePageFarFromBoundaries.args = {
47-
paginationRef: createPaginationRef({ page: 4, limit: 12 })
47+
paginationRef: createPaginationRef({ page: 4, limit: 12 }),
4848
}
4949

5050
export const MoreThan7PagesWithActivePageCloseToEnd = Template.bind({})
5151
MoreThan7PagesWithActivePageCloseToEnd.args = {
52-
paginationRef: createPaginationRef({ page: 17, limit: 12 })
52+
paginationRef: createPaginationRef({ page: 17, limit: 12 }),
5353
}

site/src/components/PaginationWidget/PaginationWidget.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ export const PaginationWidget = ({
6666
<Cond>
6767
{buildPagedList(numPages, currentPage).map((page) =>
6868
typeof page !== "number" ? (
69-
<PageButton key={`Page${page}`} activePage={currentPage} placeholder="..." disabled />
69+
<PageButton
70+
key={`Page${page}`}
71+
activePage={currentPage}
72+
placeholder="..."
73+
disabled
74+
/>
7075
) : (
7176
<PageButton
7277
key={`Page${page}`}

site/src/components/PaginationWidget/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ export const getPaginationContext = (
9797
})
9898

9999
// for storybook
100-
export const createPaginationRef = (context: PaginationContext): PaginationMachineRef => {
100+
export const createPaginationRef = (
101+
context: PaginationContext,
102+
): PaginationMachineRef => {
101103
return spawn(paginationMachine.withContext(context))
102104
}

site/src/pages/AuditPage/AuditPageView.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export default {
1414
defaultValue: 1000,
1515
},
1616
paginationRef: {
17-
defaultValue: createPaginationRef({ page: 1, limit: 25 })
18-
}
19-
}
17+
defaultValue: createPaginationRef({ page: 1, limit: 25 }),
18+
},
19+
},
2020
} as ComponentMeta<typeof AuditPageView>
2121

2222
const Template: Story<AuditPageViewProps> = (args) => (

site/src/pages/WorkspacesPage/WorkspacesPageView.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default {
8989
component: WorkspacesPageView,
9090
argTypes: {
9191
paginationRef: {
92-
defaultValue: createPaginationRef({ page: 1, limit: 25 })
92+
defaultValue: createPaginationRef({ page: 1, limit: 25 }),
9393
},
9494
workspaceRefs: {
9595
options: [

0 commit comments

Comments
 (0)