import React from 'react'
import { Pagination } from '../'
import { Action, actions, HIDE_CONTROL, Story } from '../helpers/storybook'
import { PageLinkProps } from './Pagination'
export default {
title: 'Pagination',
component: Pagination,
argTypes: {
currentPage: HIDE_CONTROL,
makeLinkLabel: HIDE_CONTROL,
disabled: { control: 'boolean' },
...actions('onPageChange'),
},
} as const
const stop = (handler: any) => (e: React.MouseEvent) => {
e.preventDefault()
handler()
}
const LinkWithHref = ({ page, disabled, onClick, ...props }: PageLinkProps) => (
)
type PStory = Story }>
export const BasicUsage: PStory = ({ onPageChange, ...args }) => {
const [current, setCurrent] = React.useState(1)
return
}
BasicUsage.args = { pageCount: 10, width: 'auto' }
BasicUsage.argTypes = {
linkAs: { options: ['link', 'button'], mapping: { link: LinkWithHref } },
}