File tree Expand file tree Collapse file tree
Components/CommandDescription Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 align-items : stretch;
99}
1010
11+ .app h1 {
12+ align-self : center;
13+ }
14+
1115.block {
1216 display : flex;
1317 flex-direction : column;
4650 display : flex;
4751 flex-direction : row-reverse;
4852 gap : 1em ;
53+ }
54+
55+
56+ .docs {
57+ display : flex;
58+ flex-direction : column;
59+ margin : 0 30px ;
60+ gap : 15px ;
61+ }
62+
63+ .docs .element {
64+
4965}
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import { CodeInputField } from "./Components/CodeInputField/CodeInputField";
66import { Button } from "./Components/Button/Button" ;
77import { StackView } from "./Components/StackView/StackView" ;
88import { CheckBox } from "./Components/CheckBox/CheckBox" ;
9+ import documentationData from "@@/documentation.json"
10+ import { CommandDescription } from "./Components/CommandDescription/CommandDescription" ;
911
1012let scope : sc . JSScope = sc . make_scope ( )
1113
@@ -73,6 +75,14 @@ const App = () => {
7375 </ div >
7476 </ div >
7577 </ div >
78+ < h1 > Commands:</ h1 >
79+ < div className = { styles . docs } >
80+ { documentationData . map ( e =>
81+ < div className = { styles . element } >
82+ < CommandDescription commandInfo = { e } />
83+ </ div >
84+ ) }
85+ </ div >
7686 </ div >
7787}
7888
Original file line number Diff line number Diff line change 1+ .container {
2+ display : flex;
3+ flex-direction : column;
4+ background-color : var (--secondary );
5+ padding : 15px 20px ;
6+ border-radius : 15px ;
7+ gap : 10px ;
8+ align-items : stretch;
9+ }
10+
11+ .container .hr {
12+ background-color : var (--text );
13+ height : 2px ;
14+ border-radius : 2px ;
15+ }
16+
17+ .header {
18+ display : flex;
19+ align-items : center;
20+ gap : 40px ;
21+ }
22+
23+ .key {
24+ margin-block : 0 ;
25+ margin : 0 ;
26+ padding : 2px ;
27+ background-color : var (--accent );
28+ width : 30px ;
29+ height : 30px ;
30+ font-size : 25px ;
31+ border-radius : 1000000px ;
32+ text-align : center;
33+ align-items : center;
34+ vertical-align : bottom;
35+ display : inline-block;
36+ line-height : 30px ;
37+ }
38+
39+ .aliases ::before + .aliases ::after {
40+ content : "," ;
41+ }
42+
43+ .aliases {
44+ display : flex;
45+ align-items : center;
46+ gap : 15px ;
47+ }
48+
49+ .alias {
50+ display : flex;
51+ opacity : 0.8 ;
52+ }
Original file line number Diff line number Diff line change 1+ import React from "react"
2+ import styles from "./CommandDescription.css"
3+
4+ export type CommandInfo = {
5+ key : string ,
6+ aliases : string [ ] ,
7+ description : string
8+ }
9+
10+ export function CommandDescription ( props : { commandInfo : CommandInfo } ) {
11+ return < div className = { styles . container } >
12+ < div className = { styles . header } >
13+ < div className = { styles . key } > { props . commandInfo . key } </ div >
14+ < div className = { styles . aliases } >
15+ { props . commandInfo . aliases . map ( e => (
16+ < div className = { styles . alias } >
17+ { e }
18+ </ div >
19+ ) ) }
20+ </ div >
21+ </ div >
22+ < div className = { styles . hr } />
23+ < div >
24+ < div >
25+ { props . commandInfo . description }
26+ </ div >
27+ </ div >
28+ </ div >
29+ }
You can’t perform that action at this time.
0 commit comments