-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[upstream] feat(layout): move all pagination controls together, use c…
…ommon interface
- Loading branch information
Showing
22 changed files
with
196 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
libs/ui/elements/src/lib/pagination-buttons/pagination-buttons.component.stories.ts
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
libs/ui/elements/src/lib/pagination/pagination.component.stories.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.stories.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* This interface is used for components that want to offer pagination | ||
* Note: pages indexes are 1-based!! so `isLastPage` means `currentPage === pagesCount` | ||
* and `isFirstPage` means `currentPage === 1` | ||
*/ | ||
export interface Paginable { | ||
isFirstPage: boolean | ||
isLastPage: boolean | ||
pagesCount: number | ||
currentPage: number | ||
goToPage(index: number): void | ||
goToNextPage(): void | ||
goToPrevPage(): void | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
libs/ui/layout/src/lib/pagination-buttons/pagination-buttons.component.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular' | ||
import { PaginationButtonsComponent } from './pagination-buttons.component' | ||
import { MockListComponent } from '../pagination/pagination.component.stories' | ||
|
||
export default { | ||
title: 'Layout/Pagination/PaginationButtonsComponent', | ||
component: PaginationButtonsComponent, | ||
decorators: [ | ||
moduleMetadata({ | ||
imports: [MockListComponent], | ||
}), | ||
], | ||
} as Meta<PaginationButtonsComponent> | ||
|
||
export const Primary: StoryObj<PaginationButtonsComponent> = { | ||
render: () => ({ | ||
template: ` | ||
<gn-ui-pagination-buttons [listComponent]="list"></gn-ui-pagination-buttons> | ||
<gn-ui-mock-list #list></gn-ui-mock-list>`, | ||
}), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.