Skip to content

Commit

Permalink
Merge pull request #59 from thelia/feat/pagination
Browse files Browse the repository at this point in the history
feat(pagination): wip, need fields
  • Loading branch information
Lucanis authored Jul 11, 2024
2 parents 8774059 + 56bff5e commit cfe855e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
25 changes: 25 additions & 0 deletions components/Organisms/Pagination/Pagination.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Pagination from './Pagination.twig';

export default {
title: 'Design System/Organisms/Pagination'
};

export const base = {
render: (args) => Pagination(args),
args: {
currentPage: 1,
totalPages: 10
},
argTypes: {
currentPage: {
control: {
type: 'number'
}
},
totalPages: {
control: {
type: 'number'
}
}
}
};
11 changes: 11 additions & 0 deletions components/Organisms/Pagination/Pagination.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="Pagination">
{% include "../../Molecules/Button/Button.twig" with { icon_left: "arrow-left", variant: "tertiary", classes: "Button--large" } %}

<div class="Pagination-input">
{% include '../../Molecules/Fields/FieldNumber/FieldNumber.twig' with { name: "page", max: totalPages, value: currentPage } %}
<span class='paragraph-3'>sur
{{ totalPages }}</span>
</div>

{% include "../../Molecules/Button/Button.twig" with { icon_left: "arrow-right", variant: "tertiary", classes: "Button--large" } %}
</div>
11 changes: 11 additions & 0 deletions components/Organisms/Pagination/pagination.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.Pagination {
display: flex;
align-items: center;
gap: 24px;

&-input {
display: flex;
align-items: center;
gap: 16px;
}
}

0 comments on commit cfe855e

Please sign in to comment.