Skip to content

Commit 1701c95

Browse files
committed
* Make use of headers to display titles
1 parent d9309a6 commit 1701c95

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

src/components/Application/index.jsx

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,34 @@ import { navigate } from 'gatsby';
44
import CardContent from '@material-ui/core/CardContent';
55
import Typography from '@material-ui/core/Typography';
66
import Card from '@material-ui/core/Card';
7+
import { CardHeader } from '@material-ui/core';
78

8-
const Application = ({ name, description, url }) => (
9-
<Card style={{ height: '100%' }}>
10-
<CardActionArea
11-
style={{ height: '100%' }}
12-
onClick={() => navigate(url)}
13-
>
14-
<CardContent>
15-
<Typography variant="h6" color="textPrimary" paragraph>
16-
{name}
17-
</Typography>
18-
<Typography color="textSecondary" paragraph>
19-
{description}
20-
</Typography>
21-
</CardContent>
22-
</CardActionArea>
23-
</Card>
24-
);
9+
const Application = ({ name, description, url }) => {
10+
/**
11+
* Go to the designated URL
12+
*/
13+
const goToUrl = () => {
14+
navigate(url);
15+
};
16+
17+
return (
18+
<Card style={{ height: '100%' }}>
19+
<CardHeader
20+
title={name}
21+
style={{ cursor: 'pointer' }}
22+
onClick={goToUrl}
23+
/>
24+
<CardActionArea
25+
onClick={goToUrl}
26+
>
27+
<CardContent>
28+
<Typography color="textSecondary" paragraph>
29+
{description}
30+
</Typography>
31+
</CardContent>
32+
</CardActionArea>
33+
</Card>
34+
);
35+
};
2536

2637
export default Application;

0 commit comments

Comments
 (0)