Skip to content

Commit

Permalink
docs(Pagination): add more controls to playground (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanyoung authored Jan 3, 2024
1 parent 5ceac40 commit 0b96ea8
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/components/Pagination/Pagination.Playground.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,39 @@ export default {
totalItemsCount: {
control: 'number',
},
arePagesVisible: {
control: 'boolean',
},
isCompact: {
control: 'boolean',
},
nextPageText: {
control: 'text',
},
prevPageText: {
control: 'text',
},
},
} as Meta;

const Template: Story<PaginationProps> = ({ ...args }) => <Pagination {...args} />;
const Template: Story<PaginationProps> = ({ ...args }) => (
<Pagination {...args} />
);
export const Playground = Template.bind({});
Playground.args = {
arePagesVisible: true,
activePage: 1,
};
Playground.parameters = {
controls: {
include: ['activePage', 'itemsPerPage', 'totalItemsCount'],
include: [
'activePage',
'itemsPerPage',
'totalItemsCount',
'arePagesVisible',
'isCompact',
'nextPageText',
'prevPageText',
],
},
};

0 comments on commit 0b96ea8

Please sign in to comment.