+
{children}
)
diff --git a/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.stories.mdx b/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.stories.mdx
deleted file mode 100644
index 59b980cf..00000000
--- a/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.stories.mdx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'
-import { useState } from 'react'
-import { SectionFooterWithPaginationInMemory } from './SectionFooterWithPaginationInMemory'
-
-
-
-# SectionFooterWithPaginationInMemory
-
-This component can conveniently be used to add a pagination with a section footer. This component leverages on [SectionFooter](/docs/components-section-sectionfooter--section-footer) and [PaginationInMemory](/docs/components-pagination-paginationinmemory--docs).
-
-export const Template = (args) => {
- const [page, setPage] = useState(1)
- return (
-
- )
-}
-
-
-
-### Props
-
-
-
-
-
-The theme of this component leverages on the components [SectionFooter](/docs/components-section-sectionfooter--section-footer#theme) and [PaginationInMemory](/docs/components-pagination-paginationinmemory--docs#theme).
diff --git a/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.stories.tsx b/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.stories.tsx
new file mode 100644
index 00000000..b4eb39a5
--- /dev/null
+++ b/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.stories.tsx
@@ -0,0 +1,66 @@
+import { Meta, StoryObj } from '@storybook/react'
+import {
+ Controls,
+ Primary,
+ Stories,
+ Subheading,
+ Title,
+ Description,
+} from '@storybook/addon-docs'
+import { IndexType } from '@aboutbits/pagination'
+import { useState } from 'react'
+import { SectionFooterVariant } from './types'
+import {
+ SectionFooterWithPaginationInMemory,
+ SectionFooterWithPaginationInMemoryProps,
+} from './SectionFooterWithPaginationInMemory'
+
+const Template = (args: SectionFooterWithPaginationInMemoryProps) => {
+ const [page, setPage] = useState(args.page)
+ return (
+
+ )
+}
+
+const meta = {
+ component: SectionFooterWithPaginationInMemory,
+ parameters: {
+ docs: {
+ page: () => (
+ <>
+
+
+
+
Props
+
+
+ >
+ ),
+ },
+ },
+ render: (args) =>
,
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const Default: Story = {
+ args: {
+ page: 0,
+ size: 10,
+ total: 60,
+ config: { indexType: IndexType.ZERO_BASED },
+ },
+}
+
+export const VariantTransparent: Story = {
+ args: {
+ ...Default.args,
+ variant: SectionFooterVariant.Transparent,
+ },
+}
diff --git a/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.tsx b/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.tsx
index 942fd7f5..9668f84c 100644
--- a/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.tsx
+++ b/src/components/section/SectionFooter/SectionFooterWithPaginationInMemory.tsx
@@ -1,7 +1,15 @@
-import { ReactElement } from 'react'
import { PaginationInMemory, PaginationInMemoryProps } from '../../pagination'
-import { SectionFooterArea } from '../index'
+import { SectionFooterArea, SectionFooterAreaProps } from '../index'
+export type SectionFooterWithPaginationInMemoryProps = Pick<
+ SectionFooterAreaProps,
+ 'variant'
+> &
+ PaginationInMemoryProps
+
+/**
+ * This component can conveniently be used to add a pagination with a section footer. This component leverages on [SectionFooter](/docs/components-section-sectionfooter--section-footer--docs) and [PaginationInMemory](/docs/components-pagination-paginationinmemory--docs).
+ */
export function SectionFooterWithPaginationInMemory({
page,
size,
@@ -9,13 +17,14 @@ export function SectionFooterWithPaginationInMemory({
onChangePage,
config,
className,
-}: PaginationInMemoryProps): ReactElement | null {
+ variant,
+}: SectionFooterWithPaginationInMemoryProps) {
if (total <= size) {
return null
}
return (
-
+
-
-# SectionFooterWithPaginationRouter
-
-This component can conveniently be used to add a pagination with a section footer. This component leverages on [SectionFooter](/docs/components-section-sectionfooter--section-footer) and [PaginationRouter](/docs/components-pagination-paginationrouter--docs).
-
-export const Template = (args) => {
- const currentParams = new URLSearchParams(window.parent.location.search)
- const currentPage = parseInt(currentParams.get('page'), 10) || 1
- return (
-
- )
-}
-
-
-
-### Props
-
-
-
-
-
-The theme of this component leverages on the components [SectionFooter](/docs/components-section-sectionfooter--section-footer#theme) and [PaginationRouter](/docs/components-pagination-paginationrouter--docs#theme).
diff --git a/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.stories.tsx b/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.stories.tsx
new file mode 100644
index 00000000..613d01bb
--- /dev/null
+++ b/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.stories.tsx
@@ -0,0 +1,56 @@
+import { Meta, StoryObj } from '@storybook/react'
+import {
+ Controls,
+ Primary,
+ Stories,
+ Subheading,
+ Title,
+ Description,
+} from '@storybook/addon-docs'
+import { IndexType } from '@aboutbits/pagination'
+import { SectionFooterWithPaginationRouter } from './SectionFooterWithPaginationRouter'
+import { SectionFooterVariant } from './types'
+
+const meta = {
+ component: SectionFooterWithPaginationRouter,
+ parameters: {
+ docs: {
+ page: () => (
+ <>
+
+
+
+ Props
+
+
+ >
+ ),
+ },
+ },
+ render: (args) => {
+ const currentParams = new URLSearchParams(window.parent.location.search)
+ const pageParam = currentParams.get('page')
+ const currentPage = pageParam ? parseInt(pageParam) : 0
+ return
+ },
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const Default: Story = {
+ args: {
+ page: 0,
+ size: 10,
+ total: 60,
+ config: { indexType: IndexType.ZERO_BASED },
+ },
+}
+
+export const VariantTransparent: Story = {
+ args: {
+ ...Default.args,
+ variant: SectionFooterVariant.Transparent,
+ },
+}
diff --git a/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.tsx b/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.tsx
index 35401123..d579c833 100644
--- a/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.tsx
+++ b/src/components/section/SectionFooter/SectionFooterWithPaginationRouter.tsx
@@ -1,7 +1,15 @@
-import { ReactElement } from 'react'
import { PaginationRouter, PaginationRouterProps } from '../../pagination'
-import { SectionFooterArea } from './SectionFooterArea'
+import { SectionFooterArea, SectionFooterAreaProps } from './SectionFooterArea'
+export type SectionFooterWithPaginationRouterProps = Pick<
+ SectionFooterAreaProps,
+ 'variant'
+> &
+ PaginationRouterProps
+
+/**
+ * This component can conveniently be used to add a pagination with a section footer. This component leverages on [SectionFooter](/docs/components-section-sectionfooter--section-footer--docs) and [PaginationRouter](/docs/components-pagination-paginationrouter--docs).
+ */
export function SectionFooterWithPaginationRouter({
page,
size,
@@ -9,13 +17,14 @@ export function SectionFooterWithPaginationRouter({
config,
className,
linkProps,
-}: PaginationRouterProps): ReactElement | null {
+ variant,
+}: SectionFooterWithPaginationRouterProps) {
if (total <= size) {
return null
}
return (
-
+