♻️(react) migrate to Storybook 7
This new release comes with breaking changes for stories and mdx docs.
This commit is contained in:
@@ -10,7 +10,7 @@ for synchronous loading as well as asynchronous loading. You can paginate your a
|
||||
fetch it from a server, the component is really versatile.
|
||||
|
||||
|
||||
<Canvas withSource={"none"}>
|
||||
<Canvas sourceState="none">
|
||||
<Story id="components-pagination--basic"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -30,7 +30,7 @@ The most basic usage you can make of it is this one, defining a pagination with
|
||||
|
||||
### Basic
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-pagination--basic"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -40,7 +40,7 @@ The most basic usage you can make of it is this one, defining a pagination with
|
||||
But this won't make you really happy if you want to paginate your list of items, so you can wire things a bit better.
|
||||
Let's make a component that paginate a list of random number.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-pagination--list"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -48,7 +48,7 @@ Let's make a component that paginate a list of random number.
|
||||
|
||||
You can also set the page programmatically, for example, if you want to use a query parameter to set the page.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-pagination--force-page"/>
|
||||
</Canvas>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentMeta } from "@storybook/react";
|
||||
import { Meta } from "@storybook/react";
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { Pagination, usePagination } from ":/components/Pagination/index";
|
||||
import { CunninghamProvider } from ":/components/Provider";
|
||||
@@ -6,7 +6,7 @@ import { CunninghamProvider } from ":/components/Provider";
|
||||
export default {
|
||||
title: "Components/Pagination",
|
||||
component: Pagination,
|
||||
} as ComponentMeta<typeof Pagination>;
|
||||
} as Meta<typeof Pagination>;
|
||||
|
||||
export const Basic = () => {
|
||||
const pagination = usePagination({
|
||||
|
||||
Reference in New Issue
Block a user