1
- import { type HeadFC , Link , type PageProps , graphql } from "gatsby" ;
2
- import { StaticImage } from "gatsby-plugin-image" ;
1
+ import type { HeadFC , PageProps } from "gatsby" ;
3
2
import { Box , Heading , Page , PageContent , Paragraph } from "grommet" ;
3
+ import {
4
+ Chrome as ChromeIcon ,
5
+ Edge as EdgeIcon ,
6
+ Firefox as FirefoxIcon ,
7
+ } from "grommet-icons" ;
4
8
import type * as React from "react" ;
5
9
import { Layout } from "../components/layout" ;
6
10
import { ToolList , ToolListItem } from "../components/toolList" ;
7
11
8
- const setupActions = [
12
+ type SetupActionName = "setup-chrome" | "setup-firefox" | "setup-edge" ;
13
+ type ExtensionActionName = "release-chrome-extension" | "release-firefox-addon" ;
14
+
15
+ const setupActions : { title : SetupActionName ; link : string } [ ] = [
9
16
{
10
17
title : "setup-chrome" ,
11
18
link : "setup-chrome" ,
@@ -20,27 +27,25 @@ const setupActions = [
20
27
} ,
21
28
] ;
22
29
23
- const extensionActions = [
30
+ const extensionActions : { title : ExtensionActionName ; link : string } [ ] = [
24
31
{
25
32
title : "release-chrome-extension" ,
26
33
link : "release-chrome-extension" ,
27
34
} ,
28
35
{
29
- title : "release-firefox-extension " ,
30
- link : "release-firefox-extension " ,
36
+ title : "release-firefox-addon " ,
37
+ link : "release-firefox-addon " ,
31
38
} ,
32
39
] ;
33
40
34
41
const IndexPage : React . FC < PageProps > = ( ) => {
35
- const logo = (
36
- < StaticImage
37
- src = "https://picsum.photos/128"
38
- alt = "Lolem ipsum"
39
- width = { 128 }
40
- height = { 128 }
41
- objectFit = "none"
42
- />
43
- ) ;
42
+ const logos = {
43
+ "setup-chrome" : < ChromeIcon color = "plain" size = "xlarge" /> ,
44
+ "setup-firefox" : < FirefoxIcon color = "plain" size = "xlarge" /> ,
45
+ "setup-edge" : < EdgeIcon color = "plain" size = "xlarge" /> ,
46
+ "release-chrome-extension" : < ChromeIcon color = "plain" size = "xlarge" /> ,
47
+ "release-firefox-addon" : < FirefoxIcon color = "plain" size = "xlarge" /> ,
48
+ } ;
44
49
45
50
return (
46
51
< Layout >
@@ -53,7 +58,7 @@ const IndexPage: React.FC<PageProps> = () => {
53
58
< Heading level = "1" margin = "none" fill >
54
59
GitHub Actions for browsers
55
60
</ Heading >
56
- < Paragraph fill >
61
+ < Paragraph textAlign = "center" fill >
57
62
Browser development tools for GitHub Actions workflows.
58
63
</ Paragraph >
59
64
</ Box >
@@ -62,34 +67,34 @@ const IndexPage: React.FC<PageProps> = () => {
62
67
< Heading level = "2" textAlign = "center" size = "xlarge" >
63
68
Setup browser
64
69
</ Heading >
65
- < Paragraph fill >
70
+ < Paragraph textAlign = "center" size = "large" fill >
66
71
GitHub Actions for setting up browsers in the workflow.
67
72
</ Paragraph >
68
73
< ToolList >
69
- { setupActions . map ( ( action ) => (
74
+ { setupActions . map ( ( { title , link } ) => (
70
75
< ToolListItem
71
- key = { action . title }
72
- title = { action . title }
73
- linkTo = { action . link }
74
- logo = { logo }
76
+ key = { title }
77
+ title = { title }
78
+ linkTo = { link }
79
+ logo = { logos [ title ] }
75
80
/>
76
81
) ) }
77
82
</ ToolList >
78
83
79
84
< Heading level = "2" textAlign = "center" size = "xlarge" >
80
85
Release extension
81
86
</ Heading >
82
- < Paragraph fill >
87
+ < Paragraph textAlign = "center" size = "large" fill >
83
88
GitHub Actions for releasing Chrome extensions and Firefox add-ons
84
89
in the workflow.
85
90
</ Paragraph >
86
91
< ToolList >
87
- { extensionActions . map ( ( action ) => (
92
+ { extensionActions . map ( ( { title , link } ) => (
88
93
< ToolListItem
89
- key = { action . title }
90
- title = { action . title }
91
- linkTo = { action . link }
92
- logo = { logo }
94
+ key = { title }
95
+ title = { title }
96
+ linkTo = { link }
97
+ logo = { logos [ title ] }
93
98
/>
94
99
) ) }
95
100
</ ToolList >
0 commit comments