forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompanies.js
More file actions
41 lines (38 loc) · 876 Bytes
/
Companies.js
File metadata and controls
41 lines (38 loc) · 876 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
import React from 'react';
import styled from 'styled-components';
import shuffleArray from '../utils/shuffleArray';
const Grid = styled.ul`
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-gap: 30px;
align-items: center;
margin-top: 60px;
margin-left: 0;
list-style: none;
img {
display: block;
max-width: 80%;
margin: auto;
}
`;
export default ({ companies }) => (
<Grid>
{shuffleArray(companies).map(({ node: company }) => (
<li>
<a
href={company.link}
target="_blank"
rel="noopener noreferrer"
aria-label={`${company.name} is using CodeSandbox`}
>
<img
height="150"
src={company.logoURL}
alt={company.name}
loading="lazy"
/>
</a>
</li>
))}
</Grid>
);