forked from nodejs/nodejs.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthors-list.tsx
More file actions
50 lines (43 loc) · 911 Bytes
/
authors-list.tsx
File metadata and controls
50 lines (43 loc) · 911 Bytes
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
42
43
44
45
46
47
48
49
50
import { css, SerializedStyles } from '@emotion/core';
import React from 'react';
import Author from './author';
const list: SerializedStyles = css`
display: flex;
flex-wrap: wrap;
margin: 5rem 0 2.5rem;
align-items: center;
color: var(--gray7);
text-transform: uppercase;
padding-left: 0;
li:first-child a {
margin-left: 0 !important;
}
h5 {
display: flex;
flex-wrap: wrap;
width: 100%;
margin: 0.5rem 0.5rem 0.5rem 0;
font-weight: normal;
font-size: 1.4rem;
}
`;
type Props = {
authors: string[];
};
const AuthorsList = ({ authors }: Props) => {
if (!authors) {
return null;
}
return (
<ul css={list}>
<h5>Contributors</h5>
{authors.map(
(author, i) =>
author && (
<Author index={i} username={author} key={author} size="60" />
)
)}
</ul>
);
};
export default AuthorsList;