1
1
import React , { useState } from 'react' ;
2
- import { Typography } from '../../base' ;
2
+ import { Grid2 , Typography } from '../../base' ;
3
3
import { ExternalLinkIcon } from '../../icons' ;
4
4
import { Modal , ModalBody , ModalButtonPrimary , ModalButtonSecondary , ModalFooter } from '../Modal' ;
5
+ import { CopyToClipboard } from '../ResourceDetailFormatters/Component' ;
5
6
import {
6
7
Card2 ,
7
8
CardActive ,
@@ -24,6 +25,8 @@ interface Tutorial {
24
25
description : string ;
25
26
status ?: boolean ;
26
27
cardImage : string ;
28
+ type ?: string ;
29
+ level ?: string ;
27
30
} ;
28
31
}
29
32
@@ -129,12 +132,16 @@ const LearningCard: React.FC<Props> = ({
129
132
< CardActive >
130
133
< CardParent style = { { borderTop : `5px solid ${ tutorial . frontmatter . themeColor } ` } } >
131
134
< div >
132
- < CardHead >
133
- < h3 >
135
+ < CardHead style = { { flexDirection : 'column' } } >
136
+ < Typography variant = "body1" color = "textSecondary" >
137
+ { tutorial . frontmatter . type }
138
+ </ Typography >
139
+ < h3 style = { { margin : '0.2rem 0.1rem' } } >
134
140
{ tutorial . frontmatter . title
135
141
? tutorial . frontmatter . title
136
142
: tutorial . frontmatter . courseTitle }
137
143
</ h3 >
144
+
138
145
{ tutorial . frontmatter . status ? (
139
146
< p >
140
147
< span > New</ span >
@@ -150,6 +157,13 @@ const LearningCard: React.FC<Props> = ({
150
157
{ courseCount } { courseType }
151
158
{ courseCount > 1 ? 's' : '' }
152
159
</ p >
160
+ < p >
161
+ Level:{ ' ' }
162
+ { tutorial ?. frontmatter ?. level
163
+ ? tutorial . frontmatter . level . charAt ( 0 ) . toUpperCase ( ) +
164
+ tutorial . frontmatter . level . slice ( 1 )
165
+ : '' }
166
+ </ p >
153
167
</ CardSubdata >
154
168
) }
155
169
< CardImage >
@@ -172,9 +186,16 @@ const LearningCard: React.FC<Props> = ({
172
186
< ModalBody >
173
187
< Typography variant = "body1" > { modalContent } </ Typography >
174
188
{ orgId && (
175
- < Typography variant = "body1" color = "textSecondary" >
176
- Your Organization ID: { orgId }
177
- </ Typography >
189
+ < Grid2 container direction = "row" alignItems = "center" spacing = { 1 } >
190
+ < Grid2 >
191
+ < Typography variant = "body1" color = "textSecondary" >
192
+ Your Organization ID: { orgId }
193
+ </ Typography >
194
+ </ Grid2 >
195
+ < Grid2 >
196
+ < CopyToClipboard data = { orgId } />
197
+ </ Grid2 >
198
+ </ Grid2 >
178
199
) }
179
200
</ ModalBody >
180
201
< ModalFooter variant = "filled" >
0 commit comments