Skip to content

Commit

Permalink
update pagenation
Browse files Browse the repository at this point in the history
  • Loading branch information
nanosuke committed Jan 25, 2024
1 parent 91749cb commit 03898c1
Show file tree
Hide file tree
Showing 11 changed files with 16,849 additions and 28,810 deletions.
45,573 changes: 16,805 additions & 28,768 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"classnames": "^2.2.6",
"core-js": "^3.3.4",
"lodash": "^4.17.15",
"react-tooltip": "^4.2.21"
"react-tooltip": "^4.2.21",
"remixicon": "^2.0.0"
},
"engines": {
"node": ">=10.x"
Expand Down Expand Up @@ -60,8 +61,7 @@
},
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"remixicon": "^2.0.0"
"react-dom": "^17.0.0 || ^18.0.0"
},
"scripts": {
"build": "rollup -c rollup.config.js",
Expand Down
5 changes: 2 additions & 3 deletions src/components/Button/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Base, BaseProps } from '../../internal/Base'
const defaultTag = 'div'
type Available = typeof defaultTag | 'span' | 'ul'

export type ButtonGroupProps<
T extends Available = typeof defaultTag
> = {} & BaseProps<T>
export type ButtonGroupProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const ButtonGroup = <T extends Available>({
className,
Expand Down
5 changes: 2 additions & 3 deletions src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ export { CardImageProps } from './CardImage'
const defaultTag = 'div'
type Available = 'div' | 'span' | 'a'

export type CardProps<T extends Available = typeof defaultTag> = {} & BaseProps<
T
>
export type CardProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const Card = Object.assign(
<T extends Available>({ className, ...props }: CardProps<T>) => {
Expand Down
5 changes: 2 additions & 3 deletions src/components/Card/CardContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Base, BaseProps } from '../../internal/Base'
const defaultTag = 'div'
type Available = typeof defaultTag | 'a'

export type CardContentProps<
T extends Available = typeof defaultTag
> = {} & BaseProps<T>
export type CardContentProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const CardContent = <T extends Available>({
className,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pagination/Pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ route: /pagination

import { Playground } from "docz"
import { Pagination } from "./Pagination"

import "remixicon/fonts/remixicon.css"

# Pagination

Expand Down
5 changes: 2 additions & 3 deletions src/components/Pagination/PaginationEllipsis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Base, BaseProps } from '../../internal/Base'
const defaultTag = 'span'
type Available = typeof defaultTag | 'li'

export type PaginationEllipsisProps<
T extends Available = typeof defaultTag
> = {} & BaseProps<T>
export type PaginationEllipsisProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const PaginationEllipsis = <T extends Available>({
className,
Expand Down
5 changes: 2 additions & 3 deletions src/components/Pagination/PaginationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Base, BaseProps } from '../../internal/Base'
const defaultTag = 'ul'
type Available = typeof defaultTag | 'div'

export type PaginationListProps<
T extends Available = typeof defaultTag
> = {} & BaseProps<T>
export type PaginationListProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const PaginationList = <T extends Available>({
className,
Expand Down
43 changes: 26 additions & 17 deletions src/components/Pagination/_Pagination.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$item-size: 44px;
$prev-next-size: 72px;
$item-size: 32px;
$prev-next-size: 32px;

.pl-pagination {
display: flex;
Expand All @@ -11,14 +11,13 @@ $prev-next-size: 72px;
.pl-pagination-previous,
.pl-pagination-next {
@include mq(small) {
height: 35px;
width: 35px;
height: 32px;
width: 32px;
}

&:hover,
a:hover {
text-decoration: none;

&.is-disabled {
cursor: default;
}
Expand All @@ -27,21 +26,28 @@ $prev-next-size: 72px;

.pl-pagination-previous,
.pl-pagination-next {
background-color: $gray30;
background-color: none;
height: $item-size;
width: $prev-next-size;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;

i {
color: $black10;
font-size: 1.5rem;
font-weight: bold;
}

&.is-disabled {
&:not(.is-disabled) {
background-color: transparent;
&:hover {
background-color: $gray30;
}
}
&.is-disabled {
cursor: default;
i {
color: $gray70;
}
Expand All @@ -52,20 +58,23 @@ $prev-next-size: 72px;
display: flex;
align-items: center;

padding-left: 5px;
padding-right: 5px;
padding-left: 6px;
padding-right: 6px;
margin: 0;
}

.pl-pagination-item {
font-size: 15px;
font-size: 14px;
line-height: 14px;
color: $black10;
font-family: Roboto;
align-items: center;
display: flex;
justify-content: center;
margin-left: 5px;
margin-right: 5px;
margin-left: 2px;
margin-right: 2px;
border-radius: 4px;
border: 1px solid $border;

> a,
> div,
Expand All @@ -74,18 +83,18 @@ $prev-next-size: 72px;
align-items: center;
justify-content: center;
color: $black10;
padding: 10px 18px; // almost 44x44 size
max-width: 44px;
padding: 8px 4px 8px 4px;
min-width: 32px;
}

&:hover {
&:hover:not(.is-active) {
cursor: pointer;
background-color: $gray40;
background-color: $gray30;
}

&.is-active {
color: $white00;
background-color: $black20;
background-color: $black10;
cursor: default;

> a,
Expand Down
5 changes: 2 additions & 3 deletions src/components/Tab/TabGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Base, BaseProps } from '../../internal/Base'
const defaultTag = 'div'
type Available = typeof defaultTag | 'span' | 'ul'

export type TabGroupProps<
T extends Available = typeof defaultTag
> = {} & BaseProps<T>
export type TabGroupProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const TabGroup = <T extends Available>({
className,
Expand Down
5 changes: 2 additions & 3 deletions src/components/Tag/TagGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { Base, BaseProps } from '../../internal/Base'
const defaultTag = 'span'
type Available = typeof defaultTag | 'div' | 'ul'

export type TagGroupProps<
T extends Available = typeof defaultTag
> = {} & BaseProps<T>
export type TagGroupProps<T extends Available = typeof defaultTag> =
{} & BaseProps<T>

export const TagGroup = <T extends Available>({
className,
Expand Down

0 comments on commit 03898c1

Please sign in to comment.