Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix(pagination): errors in pagination component. #290

Open
wants to merge 3 commits into
base: release/1.9.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import { Pagination } from '../lib/react-pagination';
export default {
title: 'Components/Pagination',
component: Pagination,
parameters: {
actions: {
disable: true,
},
},
};

export const Demo = (args) => {
Expand Down
41 changes: 18 additions & 23 deletions packages/react-pagination/docs/react-pagination-template.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ const newTemplate = ({ ...props }) => {
<select
className="sui-select-sm"
style={{ minWidth: 1, flex: 1, marginBottom: 0, marginRight: 10 }}
defaultValue=""
>
<option value="" selected disabled>
<option value="" disabled>
Bulk Actions
</option>
<option value="delete">Delete All</option>
Expand Down Expand Up @@ -189,28 +190,22 @@ export const Advanced = () => {
return (
<StorySection
title="Advanced Template"
description={[
'This method allows you to modify the default template of the component. It becomes useful when you need to display the pagination outside the main area or have a complex design to replicate. You just need to call your new template inside the ',
<code style={{ fontSize: 11 }}>paginationContent</code>,
' property.',
<br />,
<br />,
'There are 2 elements to include in your custom template:',
<ul style={{ marginTop: 0 }}>
<li style={{ marginBottom: 5 }}>
<code style={{ fontSize: 11 }}>
&#123; PaginationNav(&#123; ...props &#125;) &#125;
</code>
, to show the navigation.
</li>
<li>
<code style={{ fontSize: 11 }}>
&#123; PaginationResults(&#123; ...props &#125;) &#125;
</code>
, to show the list of items to paginate.
</li>
</ul>,
]}
description={
<>
This method allows you to modify the default template of the component. It becomes useful when you need to display the pagination outside the main area or have a complex design to replicate. You just need to call your new template inside the <code style={{ fontSize: 11 }}>paginationContent</code> property.
<br />
<br />
There are 2 elements to include in your custom template:
<br />
<code style={{ fontSize: 11 }}>
&#123; PaginationNav(&#123; ...props &#125;) &#125;
</code> , to show the navigation.
<br />
<code style={{ fontSize: 11 }}>
&#123; PaginationResults(&#123; ...props &#125;) &#125;
</code> , to show the list of items to paginate.
</>
}
code="const newTemplate = ({ ...props }) => { ... }"
code2="&lt;Pagination limit={ 5 } paginationContent={ newTemplate }&gt; ... &lt;/Pagination&gt;"
isLast={true}
Expand Down