File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { Box } from "grommet" ;
2
+ import type * as React from "react" ;
3
+
4
+ interface Props {
5
+ children : React . ReactNode ;
6
+ }
7
+
8
+ export const CodeBlock : React . FC < Props > = ( { children } ) => (
9
+ < Box
10
+ background = "light-2"
11
+ pad = { { horizontal : "medium" , vertical : "small" } }
12
+ round = "small"
13
+ >
14
+ < pre >
15
+ < code > { children } </ code >
16
+ </ pre >
17
+ </ Box >
18
+ ) ;
Original file line number Diff line number Diff line change 1
1
import type { HeadFC , PageProps } from "gatsby" ;
2
2
import {
3
- Anchor ,
4
3
Box ,
5
4
Heading ,
6
5
NameValueList ,
@@ -10,6 +9,7 @@ import {
10
9
Paragraph ,
11
10
} from "grommet" ;
12
11
import { Actions as ActionsIcon , Github as GithubIcon } from "grommet-icons" ;
12
+ import { CodeBlock } from "../components/code" ;
13
13
import { Layout } from "../components/layout" ;
14
14
import { ExternalLink } from "../components/link" ;
15
15
import { Seo } from "../components/seo" ;
@@ -26,6 +26,8 @@ interface Props {
26
26
27
27
const ActionPage : React . FC < PageProps & Props > = ( { pageContext } ) => {
28
28
const { name, action } = pageContext ;
29
+ const usage = `- uses: browser-actions/${ name } @latest` ;
30
+
29
31
return (
30
32
< Layout >
31
33
< Page kind = "narrow" margin = { { vertical : "xlarge" } } >
@@ -52,6 +54,9 @@ const ActionPage: React.FC<PageProps & Props> = ({ pageContext }) => {
52
54
{ action . description }
53
55
</ Paragraph >
54
56
57
+ < Heading level = "2" > Usage</ Heading >
58
+ < CodeBlock > { usage } </ CodeBlock >
59
+
55
60
< Heading level = "2" > Inputs</ Heading >
56
61
{ action . inputs ? (
57
62
< NameValueList >
You can’t perform that action at this time.
0 commit comments