From 72f9a312da20fbc41f58b49992ba9249b10119d9 Mon Sep 17 00:00:00 2001 From: Alison Joseph Date: Mon, 31 Oct 2022 14:54:59 -0500 Subject: [PATCH 1/3] chore(pagination): add playground story closes #12272 --- .../Pagination/Pagination.stories.js | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/packages/react/src/components/Pagination/Pagination.stories.js b/packages/react/src/components/Pagination/Pagination.stories.js index 3b8c1883a5da..26c624b7a7a9 100644 --- a/packages/react/src/components/Pagination/Pagination.stories.js +++ b/packages/react/src/components/Pagination/Pagination.stories.js @@ -98,3 +98,96 @@ export const PaginationWithCustomPageSizesLabel = (args) => { PaginationWithCustomPageSizesLabel.storyName = 'Pagination with custom page sizes label'; + +export const Playground = (args) => ; + +Playground.argTypes = { + className: { + control: false, + }, + id: { + control: false, + }, + backwardText: { + control: { + type: 'text', + }, + defaultValue: 'Previous page', + }, + forwardText: { + control: { + type: 'text', + }, + defaultValue: 'Next page', + }, + disabled: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + isLastPage: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + itemsPerPageText: { + control: { + type: 'text', + }, + defaultValue: 'Items per page:', + }, + page: { + control: { + type: 'number', + }, + defaultValue: 1, + }, + pageInputDisabled: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + pageSize: { + control: { + type: 'number', + }, + defaultValue: 10, + }, + pageSizes: { + control: { + type: 'array', + }, + defaultValue: [10, 20, 30, 40, 50], + }, + pageNumberText: { + control: { + type: 'text', + }, + defaultValue: 'Page Number', + }, + pagesUnknown: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + pageSizeInputDisabled: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + size: { + options: ['sm', 'md', 'lg'], + control: { type: 'select' }, + }, + totalItems: { + control: { + type: 'number', + }, + defaultValue: 103, + }, +}; From 123b10e5f1524bdad5dd43823b6c7fa5f84baf11 Mon Sep 17 00:00:00 2001 From: Alison Joseph Date: Mon, 31 Oct 2022 15:05:48 -0500 Subject: [PATCH 2/3] chore(unstable_pagination): add playground story --- .../experimental/Pagination-story.js | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/Pagination/experimental/Pagination-story.js b/packages/react/src/components/Pagination/experimental/Pagination-story.js index cda2d3d73a94..41c1493c402a 100644 --- a/packages/react/src/components/Pagination/experimental/Pagination-story.js +++ b/packages/react/src/components/Pagination/experimental/Pagination-story.js @@ -17,7 +17,7 @@ import { import { unstable_PageSelector as PageSelector, unstable_Pagination as Pagination, -} from '../../../'; +} from '../../..'; const props = () => ({ disabled: boolean('Disable backward/forward buttons (disabled)', false), @@ -74,3 +74,68 @@ export const WithNoSizerChildInputOrChildSelector = () => ( WithNoSizerChildInputOrChildSelector.storyName = 'with no sizer, child input, or child selector'; + +export const Playground = (args) => ; + +Playground.argTypes = { + className: { + control: false, + }, + children: { + control: false, + }, + id: { + control: false, + }, + forwardText: { + control: { + type: 'text', + }, + defaultValue: 'Next page', + }, + disabled: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + itemRangeText: { + control: false, + }, + itemsPerPageText: { + control: { + type: 'text', + }, + defaultValue: 'Items per page:', + }, + initialPage: { + control: { + type: 'number', + }, + defaultValue: 1, + }, + pageSize: { + control: { + type: 'number', + }, + defaultValue: 10, + }, + pageSizes: { + control: { + type: 'array', + }, + defaultValue: [10, 20, 30, 40, 50], + }, + pagesUnknown: { + control: { + type: 'boolean', + }, + defaultValue: 'false', + }, + totalItems: { + control: { + type: 'number', + }, + defaultValue: 350, + }, +}; From 7b1f3e3bcc65f589cfccec46069e550ec5b5ae8b Mon Sep 17 00:00:00 2001 From: Alison Joseph Date: Tue, 1 Nov 2022 09:06:01 -0500 Subject: [PATCH 3/3] chore: add itemtext false --- packages/react/src/components/Pagination/Pagination.stories.js | 3 +++ .../src/components/Pagination/experimental/Pagination-story.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/react/src/components/Pagination/Pagination.stories.js b/packages/react/src/components/Pagination/Pagination.stories.js index 26c624b7a7a9..f8d20fe8dac7 100644 --- a/packages/react/src/components/Pagination/Pagination.stories.js +++ b/packages/react/src/components/Pagination/Pagination.stories.js @@ -108,6 +108,9 @@ Playground.argTypes = { id: { control: false, }, + itemText: { + control: false, + }, backwardText: { control: { type: 'text', diff --git a/packages/react/src/components/Pagination/experimental/Pagination-story.js b/packages/react/src/components/Pagination/experimental/Pagination-story.js index 41c1493c402a..b1564177e42c 100644 --- a/packages/react/src/components/Pagination/experimental/Pagination-story.js +++ b/packages/react/src/components/Pagination/experimental/Pagination-story.js @@ -87,6 +87,9 @@ Playground.argTypes = { id: { control: false, }, + itemText: { + control: false, + }, forwardText: { control: { type: 'text',