-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stubbed out authoring list and book view components
- Loading branch information
Showing
9 changed files
with
116 additions
and
20 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
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
13 changes: 13 additions & 0 deletions
13
src/components/paragraphs/sup-pre-built/pre-built-author-list.tsx
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,13 @@ | ||
import {HTMLAttributes} from "react"; | ||
|
||
type Props = HTMLAttributes<HTMLDivElement>; | ||
|
||
const PreBuiltAuthorList = async ({...props}: Props) => { | ||
// Fetch all the books, sort by authors, and then build pagination and side alpha selection. | ||
return ( | ||
<div {...props}> | ||
Authoring list | ||
</div> | ||
) | ||
} | ||
export default PreBuiltAuthorList; |
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,26 @@ | ||
import {NodeSupBook} from "@lib/gql/__generated__/drupal"; | ||
import PagedList from "@components/elements/paged-list"; | ||
import SupBookCard from "@components/nodes/cards/sup-book/sup-book-card"; | ||
|
||
type Props = { | ||
/** | ||
* List of nodes to display. | ||
*/ | ||
items: NodeSupBook[] | ||
/** | ||
* If those nodes titles should display as <h2> or <h3> | ||
*/ | ||
headingLevel?: "h2" | "h3" | ||
} | ||
|
||
const BookListView = ({items, headingLevel}: Props) => { | ||
return ( | ||
<PagedList ulProps={{className: "list-unstyled grid grid-cols-3 gap-10"}} itemsPerPage={20}> | ||
{items.map(item => | ||
<SupBookCard key={item.id} node={item} headingLevel={headingLevel}/> | ||
)} | ||
</PagedList> | ||
) | ||
} | ||
|
||
export default BookListView; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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