File tree Expand file tree Collapse file tree 3 files changed +88
-0
lines changed Expand file tree Collapse file tree 3 files changed +88
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ import { FenceWrapper } from './lib/nodes/fence-wrapper.component';
54
54
import { VideoPlayer , videoPlayer } from './lib/tags/video-player.component' ;
55
55
import { TableOfContents } from './lib/tags/table-of-contents.component' ;
56
56
import { tableOfContents } from './lib/tags/table-of-contents.schema' ;
57
+ import { Quote } from './lib/tags/quote.component' ;
58
+ import { quote } from './lib/tags/quote.schema' ;
57
59
// TODO fix this export
58
60
export { GithubRepository } from './lib/tags/github-repository.component' ;
59
61
@@ -84,6 +86,7 @@ export const getMarkdocCustomConfig = (
84
86
personas,
85
87
'project-details' : projectDetails ,
86
88
pill,
89
+ quote,
87
90
'short-embeds' : shortEmbeds ,
88
91
'short-video' : shortVideo ,
89
92
'side-by-side' : sideBySide ,
@@ -114,6 +117,7 @@ export const getMarkdocCustomConfig = (
114
117
Personas,
115
118
ProjectDetails,
116
119
Pill,
120
+ Quote,
117
121
ShortEmbeds,
118
122
ShortVideo,
119
123
SideBySide,
Original file line number Diff line number Diff line change
1
+ import { cx } from '@nx/nx-dev/ui-primitives' ;
2
+
3
+ export interface QuoteProps {
4
+ quote : string ;
5
+ author : string ;
6
+ title ?: string ;
7
+ companyIcon ?: string ;
8
+ }
9
+
10
+ export function Quote ( {
11
+ quote,
12
+ author,
13
+ title,
14
+ companyIcon,
15
+ } : QuoteProps ) : JSX . Element {
16
+ return (
17
+ < figure className = "not-prose relative my-8 rounded-2xl bg-white p-8 shadow-lg ring-1 ring-slate-900/5 dark:bg-slate-800" >
18
+ < svg
19
+ className = "absolute left-6 top-6 h-12 w-12 text-slate-100 dark:text-slate-700"
20
+ fill = "currentColor"
21
+ viewBox = "0 0 24 24"
22
+ aria-hidden = "true"
23
+ >
24
+ < path d = "M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 01-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 01-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z" />
25
+ </ svg >
26
+
27
+ < blockquote className = "relative" >
28
+ < p className = "pl-12 text-lg font-semibold tracking-tight text-slate-900 dark:text-white" >
29
+ { quote }
30
+ </ p >
31
+ </ blockquote >
32
+
33
+ < div className = "mt-6 flex items-center gap-x-4 pl-12" >
34
+ < div className = "flex-auto" >
35
+ < div className = "text-sm font-semibold text-slate-700 dark:text-slate-300" >
36
+ { author }
37
+ </ div >
38
+ { title && (
39
+ < div className = "text-xs text-slate-500 dark:text-slate-400" >
40
+ { title }
41
+ </ div >
42
+ ) }
43
+ </ div >
44
+ { companyIcon && (
45
+ < div className = "h-10 w-10 flex-none overflow-hidden" >
46
+ < img
47
+ src = { companyIcon }
48
+ aria-hidden = "true"
49
+ className = "h-full w-full object-contain"
50
+ alt = "Company logo"
51
+ />
52
+ </ div >
53
+ ) }
54
+ </ div >
55
+ </ figure >
56
+ ) ;
57
+ }
Original file line number Diff line number Diff line change
1
+ import { Schema } from '@markdoc/markdoc' ;
2
+
3
+ export const quote : Schema = {
4
+ render : 'Quote' ,
5
+ attributes : {
6
+ quote : {
7
+ type : 'String' ,
8
+ required : true ,
9
+ } ,
10
+ author : {
11
+ type : 'String' ,
12
+ required : true ,
13
+ } ,
14
+ title : {
15
+ type : 'String' ,
16
+ required : false ,
17
+ } ,
18
+ image : {
19
+ type : 'String' ,
20
+ required : false ,
21
+ } ,
22
+ companyIcon : {
23
+ type : 'String' ,
24
+ required : false ,
25
+ } ,
26
+ } ,
27
+ } ;
You can’t perform that action at this time.
0 commit comments