Skip to content

Commit

Permalink
Merge pull request #161 from nabeliwo/update-pagination
Browse files Browse the repository at this point in the history
Update Pagination component
  • Loading branch information
nabeliwo authored Jun 17, 2019
2 parents 11b0dce + 7eed6ba commit beea82e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ interface Props {
current: number
onClick: (pageNumber: number) => void
padding?: number
className?: string
}

const PaginationComponent: React.FC<Props & InjectedProps> = ({
total,
current,
onClick,
padding = 4,
className = '',
theme,
}) => {
if (total <= 1) return null
Expand All @@ -44,7 +46,7 @@ const PaginationComponent: React.FC<Props & InjectedProps> = ({
)

return (
<Wrapper>
<Wrapper className={className}>
<List theme={theme}>
{prevPage}
{pages}
Expand All @@ -67,9 +69,12 @@ const List = styled.ul`
display: flex;
border-radius: ${frame.border.radius.s};
border: 1px solid ${palette.Mono_P20};
margin: 0;
padding: 0;
& > li {
margin: 0;
padding: 0;
list-style: none;
&:not(:first-child) {
Expand Down

0 comments on commit beea82e

Please sign in to comment.