File tree Expand file tree Collapse file tree 4 files changed +32
-3
lines changed
Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 4.4.5] - 2025-08-12
4+
5+ Fix broken Pagination component
6+
37## [ 4.4.4] - 2025-07-18
48
59For PostgRESTInfiniteScrollView
Original file line number Diff line number Diff line change 11{
22 "name" : " @macrostrat/ui-components" ,
3- "version" : " 4.4.4 " ,
3+ "version" : " 4.4.5 " ,
44 "description" : " UI components for React and Blueprint.js" ,
55 "main" : " dist/cjs/index.js" ,
66 "module" : " dist/esm/index.js" ,
Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ import { APIResultView } from "./frontend";
66
77const Pagination = ( props ) => {
88 const { currentPage, nextDisabled, setPage } = props ;
9+
910 return h ( ButtonGroup , [
1011 h (
1112 Button ,
1213 {
13- onClick : setPage ( currentPage - 1 ) ,
14+ onClick : ( ) => setPage ( currentPage - 1 ) ,
1415 icon : "arrow-left" ,
1516 disabled : currentPage <= 0 ,
1617 } ,
@@ -19,7 +20,7 @@ const Pagination = (props) => {
1920 h (
2021 Button ,
2122 {
22- onClick : setPage ( currentPage + 1 ) ,
23+ onClick : ( ) => setPage ( currentPage + 1 ) ,
2324 rightIcon : "arrow-right" ,
2425 disabled : nextDisabled ,
2526 } ,
Original file line number Diff line number Diff line change 1+ import { ComponentStory , ComponentMeta } from "@storybook/react-vite" ;
2+ import h from "@macrostrat/hyper" ;
3+ import { Pagination } from "../src" ;
4+ import { useState } from "react" ;
5+
6+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7+ export default {
8+ title : "UI components/Pagination" ,
9+ component : Pagination ,
10+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
11+ argTypes : { } ,
12+ } as ComponentMeta < typeof Pagination > ;
13+
14+ export function Basic ( ) {
15+ const [ ix , setIX ] = useState ( 0 ) ;
16+ return h ( "div" , [
17+ h ( "p" , `Current page: ${ ix } ` ) ,
18+ h ( Pagination , {
19+ currentPage : ix ,
20+ nextDisabled : false ,
21+ setPage : ( page : number ) => setIX ( page ) ,
22+ } ) ,
23+ ] ) ;
24+ }
You can’t perform that action at this time.
0 commit comments