@charcoal-ui/react-sandbox 5.4.4 → 5.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charcoal-ui/react-sandbox",
3
- "version": "5.4.4",
3
+ "version": "5.5.0-beta.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -41,11 +41,11 @@
41
41
  "polished": "^4.1.4",
42
42
  "react-spring": "^9.0.0",
43
43
  "warning": "^4.0.3",
44
- "@charcoal-ui/react": "5.4.4",
45
- "@charcoal-ui/styled": "5.4.4",
46
- "@charcoal-ui/foundation": "5.4.4",
47
- "@charcoal-ui/theme": "5.4.4",
48
- "@charcoal-ui/utils": "5.4.4"
44
+ "@charcoal-ui/foundation": "5.5.0-beta.0",
45
+ "@charcoal-ui/styled": "5.5.0-beta.0",
46
+ "@charcoal-ui/react": "5.5.0-beta.0",
47
+ "@charcoal-ui/theme": "5.5.0-beta.0",
48
+ "@charcoal-ui/utils": "5.5.0-beta.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": ">=17.0.0",
@@ -1,17 +1,24 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite'
2
2
  import Pager from '.'
3
+ import { useState } from 'react'
4
+
5
+ function PagerWithState(args: React.ComponentProps<typeof Pager>) {
6
+ const [page, setPage] = useState(args.page)
7
+ return <Pager {...args} page={page} onChange={setPage} />
8
+ }
3
9
 
4
10
  export default {
5
11
  title: 'react-sandbox/Pager',
6
12
  component: Pager,
7
- args: {
8
- page: 5,
9
- pageCount: 10,
13
+ parameters: {
14
+ layout: 'centered',
10
15
  },
11
16
  } satisfies Meta<typeof Pager>
12
17
 
13
18
  export const Default: StoryObj<typeof Pager> = {
14
- render: (props) => {
15
- return <Pager {...props}>children</Pager>
19
+ args: {
20
+ page: 5,
21
+ pageCount: 10,
16
22
  },
23
+ render: (args) => <PagerWithState {...args} />,
17
24
  }