Skip to content

Commit

Permalink
feat(components): add pagination recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Niznikr committed Jan 8, 2025
1 parent fe07097 commit 4fbcfc7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/components/stories/composition.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import type { ComponentPropsWithoutRef } from 'react';

import { Box } from '@launchpad-ui/box';
import { Icon } from '@launchpad-ui/icons';
import { vars } from '@launchpad-ui/vars';
import { expect, userEvent, within } from '@storybook/test';
Expand Down Expand Up @@ -271,3 +272,21 @@ export const TagWithOverlay: Story = {
);
},
};

export const Pagination: Story = {
render: () => {
return (
<Box display="flex" alignItems="center">
<IconButton icon="chevrons-left" size="small" variant="minimal" aria-label="first" />
<IconButton icon="chevron-left" size="small" variant="minimal" aria-label="previous" />
<Box display="flex" alignItems="center" gap="$200" marginInline="$200">
<Text style={{ fontWeight: vars.fontWeight.semibold }}>1-2</Text>
<Text> of </Text>
<Text style={{ fontWeight: vars.fontWeight.semibold }}>4</Text>
</Box>
<IconButton icon="chevron-right" size="small" variant="minimal" aria-label="next" />
<IconButton icon="chevrons-right" size="small" variant="minimal" aria-label="last" />
</Box>
);
},
};

0 comments on commit 4fbcfc7

Please sign in to comment.