diff --git a/src/components/Paginator.tsx b/src/components/Paginator.tsx
index 289803bf8..526648c5d 100644
--- a/src/components/Paginator.tsx
+++ b/src/components/Paginator.tsx
@@ -1,7 +1,18 @@
-import { Button, HStack, IconButton } from "@hope-ui/solid"
+import {
+ Button,
+ HStack,
+ IconButton,
+ Popover,
+ PopoverArrow,
+ PopoverBody,
+ PopoverContent,
+ PopoverTrigger,
+ createDisclosure,
+} from "@hope-ui/solid"
import { createMemo, For, mergeProps, Show } from "solid-js"
import { createStore } from "solid-js/store"
import { FaSolidAngleLeft, FaSolidAngleRight } from "solid-icons/fa"
+import { TbSelector } from "solid-icons/tb"
export interface PaginatorProps {
colorScheme?:
@@ -54,6 +65,9 @@ export const Paginator = (props: PaginatorProps) => {
)
return Array.from({ length: max - current }, (_, i) => current + 1 + i)
})
+ const allPages = createMemo(() => {
+ return Array.from({ length: pages() }, (_, i) => 1 + i)
+ })
const size = {
"@initial": "sm",
"@md": "md",
@@ -62,6 +76,12 @@ export const Paginator = (props: PaginatorProps) => {
setStore("current", page)
merged.onChange?.(page)
}
+ const { isOpen, onClose, onOpen } = createDisclosure()
+ const popoverTriggerProps = {
+ rightIcon: ,
+ iconSpacing: "0",
+ }
+
return (
1}>
@@ -101,14 +121,52 @@ export const Paginator = (props: PaginatorProps) => {
)}
-
+ 10 ? "$2_5" : "$3"}
+ {...(pages() > merged.maxShowPage
+ ? popoverTriggerProps
+ : undefined)}
+ >
+ {store.current}
+
+
+
+
+
+ {(page) => {
+ return (
+
+ )
+ }}
+
+
+
+
+
{(page) => (