Skip to content

Commit d896ca1

Browse files
committed
chore: updates component api structure and tests
1 parent 1b29448 commit d896ca1

28 files changed

+521
-552
lines changed

package-lock.json

Lines changed: 98 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/pagination/demo/OffsetPagination.stories.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Meta, ArgsTable, Canvas, Story, Markdown } from '@storybook/addon-docs';
22
import { useArgs } from '@storybook/client-api';
33
import { OffsetPagination } from '@zendeskgarden/react-pagination';
4-
import { OffsetPaginationStory } from './stories/OffsetPaginationStory';
54
import README from '../README.md';
65

76
<Meta title="Packages/Pagination/OffsetPagination" component={OffsetPagination} />
@@ -15,7 +14,17 @@ import README from '../README.md';
1514
<Canvas>
1615
<Story
1716
name="OffsetPagination"
18-
args={{ currentPage: 1, totalPages: 11 }}
17+
args={{
18+
currentPage: 1,
19+
totalPages: 11,
20+
labels: {
21+
gap: 'Ellipsis indicating non-visible pages',
22+
page: p => `Page ${p}`,
23+
next: 'Next page',
24+
previous: 'Previous page'
25+
},
26+
'aria-label': 'Pagination'
27+
}}
1928
parameters={{
2029
design: {
2130
allowFullscreen: true,
@@ -27,7 +36,7 @@ import README from '../README.md';
2736
{args => {
2837
const updateArgs = useArgs()[1];
2938
const handleChange = currentPage => updateArgs({ currentPage });
30-
return <OffsetPaginationStory {...args} onChange={handleChange} />;
39+
return <OffsetPagination {...args} onChange={handleChange} />;
3140
}}
3241
</Story>
3342
</Canvas>

packages/pagination/demo/stories/OffsetPaginationStory.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

packages/pagination/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"sideEffects": false,
2222
"types": "dist/typings/index.d.ts",
2323
"dependencies": {
24-
"@zendeskgarden/container-pagination": "^1.0.0",
2524
"@zendeskgarden/container-utilities": "^2.0.0",
2625
"polished": "^4.0.0",
2726
"prop-types": "^15.5.7"

0 commit comments

Comments
 (0)