File tree Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { Fragment } from 'react' ;
2
2
3
3
import { FunctionReference } from './FunctionReference' ;
4
- import { Divider , View } from '@aws-amplify/ui-react' ;
4
+ import { Divider , View , Flex } from '@aws-amplify/ui-react' ;
5
5
import { API_CATEGORIES , API_SUB_CATEGORIES } from '@/data/api-categories.mjs' ;
6
6
import references from '@/directory/apiReferences.json' ;
7
7
@@ -18,6 +18,20 @@ export const ReferencePage = ({ category }) => {
18
18
< FunctionReference func = { child } />
19
19
</ Fragment >
20
20
) ) }
21
+ < Flex className = "api-legend-container" >
22
+ < Flex >
23
+ < View as = "span" className = "api-legend interface" />
24
+ Interface
25
+ </ Flex >
26
+ < Flex >
27
+ < View as = "span" className = "api-legend reference" />
28
+ Reference
29
+ </ Flex >
30
+ < Flex >
31
+ < View as = "span" className = "api-legend union" />
32
+ Union/Intersection
33
+ </ Flex >
34
+ </ Flex >
21
35
</ View >
22
36
) ;
23
37
} ;
Original file line number Diff line number Diff line change 21
21
align-items : center ;
22
22
justify-content : center ;
23
23
z-index : 99999 ;
24
+
24
25
& --open {
25
26
display : flex ;
26
27
}
55
56
grid-template-columns : 1fr ;
56
57
grid-template-rows : auto ;
57
58
align-items : baseline ;
59
+
58
60
dt {
59
61
color : var (--amplify-colors-font-secondary );
60
62
}
63
+
61
64
dd {
62
65
padding-inline-start : var (--amplify-space-small );
63
66
}
67
+
64
68
& __name {
65
69
text-align : start ;
66
70
color : var (--amplify-colors-neutral-90 );
67
71
font-weight : bold ;
68
72
align-items : baseline ;
69
73
}
70
- & __description , & __value {
74
+
75
+ & __description ,
76
+ & __value {
71
77
color : var (--amplify-colors-neutral-90 );
72
78
}
73
79
}
90
96
.api-modal__content {
91
97
grid-template-columns : auto 1fr ;
92
98
gap : var (--amplify-space-small );
99
+
93
100
dt {
94
101
text-align : end ;
95
102
}
113
120
padding : 0 ;
114
121
background : none ;
115
122
text-decoration : underline ;
123
+
116
124
& :hover {
117
125
text-decoration : none ;
118
126
}
127
+
119
128
& :focus-visible {
120
129
outline : 2px solid var (--amplify-colors-border-focus );
121
130
outline-offset : 2px ;
122
131
}
132
+
123
133
& .kind-2097152 {
124
134
color : var (--amplify-colors-red-80 );
125
135
}
132
142
color : var (--amplify-colors-blue-80 );
133
143
}
134
144
}
145
+
146
+ .api-legend {
147
+ width : 20px ;
148
+ height : 20px ;
149
+ border-radius : 20px ;
150
+
151
+ & .interface {
152
+ background-color : var (--amplify-colors-green-80 );
153
+ }
154
+
155
+ & .reference {
156
+ background-color : var (--amplify-colors-red-80 );
157
+ }
158
+
159
+ & .union {
160
+ background-color : var (--amplify-colors-blue-80 );
161
+ }
162
+ }
163
+
164
+ .api-legend-container {
165
+ margin : var (--amplify-space-medium );
166
+ justify-content : space-between ;
167
+ }
You can’t perform that action at this time.
0 commit comments