-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathArticleHeader.jsx
More file actions
41 lines (37 loc) · 1.04 KB
/
ArticleHeader.jsx
File metadata and controls
41 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { Stack } from "react-bootstrap";
import ArticleHeaderDesc from "./ArticleHeaderDesc";
import ArticleHeaderTitle from "./ArticleHeaderTitle";
import ArticleHeaderAuthorDate from "./ArticleHeaderAuthorDate";
//Component for the article header
/*
takes in:
string representing article title,
string representing article description,
string of author's name,
string containing date of creation
(for now this is simply normal data like "Oct 9, 2023",
but if we use a postgres time date it will need to be converted)
//and state for whether article is bookmarked and toggler for that bookmark
*/
export default function ArticleHeader({
title,
description,
author,
date,
isBookmarked,
isPending,
bookmarkToggler,
}) {
return (
<Stack gap={2}>
<ArticleHeaderTitle
title={title}
isBookmarked={isBookmarked}
isPending={isPending}
bookmarkToggler={bookmarkToggler}
/>
<ArticleHeaderDesc desc={description} />
<ArticleHeaderAuthorDate author={author} date={date} />
</Stack>
);
}