@antv/dumi-theme-antv 0.2.2 → 0.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +32 -33
- package/dist/builtins/Playground/index.d.ts +24 -0
- package/{es/builtins/Example.js → dist/builtins/Playground/index.js} +40 -33
- package/dist/builtins/Playground/index.module.less +15 -0
- package/dist/context.d.ts +5 -0
- package/dist/context.js +2 -0
- package/dist/layouts/DocLayout.d.ts +7 -0
- package/dist/layouts/DocLayout.js +38 -0
- package/dist/layouts/entry/API.d.ts +10 -0
- package/dist/layouts/entry/API.js +12 -0
- package/dist/layouts/entry/Index.d.ts +7 -0
- package/dist/layouts/entry/Index.js +71 -0
- package/dist/layouts/entry/Manual.d.ts +8 -0
- package/dist/layouts/entry/Manual.js +14 -0
- package/dist/locales/en.json +98 -0
- package/dist/locales/zh.json +98 -0
- package/dist/pages/404.d.ts +6 -0
- package/dist/pages/404.js +15 -0
- package/dist/pages/Example/index.d.ts +6 -0
- package/dist/pages/Example/index.js +139 -0
- package/dist/pages/Example/index.module.less +40 -0
- package/dist/pages/Examples/components/Accouncement/index.d.ts +6 -0
- package/dist/pages/Examples/components/Accouncement/index.js +60 -0
- package/dist/pages/Examples/components/Accouncement/index.module.less +9 -0
- package/dist/pages/Examples/components/Article/index.d.ts +2 -0
- package/dist/pages/Examples/components/Article/index.js +8 -0
- package/dist/pages/Examples/components/Article/index.module.less +2 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +10 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +74 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +9 -0
- package/{es/builtins/Table.js → dist/pages/Examples/components/ExampleTopicMenu/index.js} +47 -41
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +10 -0
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +33 -0
- package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +10 -0
- package/dist/pages/Examples/components/GalleryPageContent/index.js +81 -0
- package/dist/pages/Examples/index.d.ts +8 -0
- package/dist/pages/Examples/index.js +75 -0
- package/dist/pages/Examples/index.module.less +605 -0
- package/dist/pages/Examples/types.d.ts +33 -0
- package/dist/pages/Examples/types.js +1 -0
- package/dist/plugin/examples.d.ts +12 -0
- package/dist/plugin/examples.js +91 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.js +100 -0
- package/dist/plugin/utils.d.ts +5 -0
- package/dist/plugin/utils.js +45 -0
- package/dist/slots/404.d.ts +2 -0
- package/{es/antv/404/index.js → dist/slots/404.js} +4 -9
- package/{es/antv/Cases/Cases.d.ts → dist/slots/Cases/index.d.ts} +4 -4
- package/{es/antv/Cases/Cases.js → dist/slots/Cases/index.js} +25 -25
- package/{src/antv/Cases/Cases.module.less → dist/slots/Cases/index.module.less} +36 -5
- package/dist/slots/CodeEditor/Toolbar.d.ts +67 -0
- package/dist/slots/CodeEditor/Toolbar.js +152 -0
- package/dist/slots/CodeEditor/Toolbar.module.less +81 -0
- package/dist/slots/CodeEditor/index.d.ts +58 -0
- package/dist/slots/CodeEditor/index.js +200 -0
- package/dist/slots/CodeEditor/index.module.less +11 -0
- package/dist/slots/CodeEditor/utils.d.ts +42 -0
- package/dist/slots/CodeEditor/utils.js +157 -0
- package/dist/slots/CodePreview/CodeHeader.d.ts +19 -0
- package/dist/slots/CodePreview/CodeHeader.js +32 -0
- package/dist/slots/CodePreview/CodeHeader.module.less +0 -0
- package/dist/slots/CodePreview/index.d.ts +17 -0
- package/dist/slots/CodePreview/index.js +29 -0
- package/dist/slots/CodePreview/index.module.less +42 -0
- package/dist/slots/CodeRunner/index.d.ts +14 -0
- package/dist/slots/CodeRunner/index.js +76 -0
- package/dist/slots/CodeRunner/index.module.less +0 -0
- package/dist/slots/CodeRunner/utils.d.ts +10 -0
- package/dist/slots/CodeRunner/utils.js +36 -0
- package/dist/slots/Companies/index.d.ts +13 -0
- package/dist/slots/Companies/index.js +49 -0
- package/dist/slots/Companies/index.module.less +82 -0
- package/dist/slots/Detail/News.d.ts +9 -0
- package/{es/antv/Banner/Notification.js → dist/slots/Detail/News.js} +8 -11
- package/{src/antv/Banner/Notification.module.less → dist/slots/Detail/News.module.less} +15 -3
- package/dist/slots/Detail/index.d.ts +26 -0
- package/dist/slots/Detail/index.js +124 -0
- package/{src/antv/Banner/Banner.module.less → dist/slots/Detail/index.module.less} +42 -74
- package/dist/slots/ExampleSider/index.d.ts +55 -0
- package/dist/slots/ExampleSider/index.js +218 -0
- package/dist/slots/ExampleSider/index.module.less +141 -0
- package/{es/antv → dist/slots}/Features/FeatureCard.d.ts +1 -1
- package/{es/antv → dist/slots}/Features/FeatureCard.js +6 -6
- package/{src/antv → dist/slots}/Features/FeatureCard.module.less +8 -1
- package/{es/antv → dist/slots}/Features/index.d.ts +2 -2
- package/{es/antv → dist/slots}/Features/index.js +17 -25
- package/{src/antv/Features/Features.module.less → dist/slots/Features/index.module.less} +34 -3
- package/dist/slots/Footer/index.d.ts +18 -0
- package/dist/slots/Footer/index.js +187 -0
- package/dist/slots/Footer/index.module.less +85 -0
- package/dist/slots/Header/Logo.d.ts +7 -0
- package/{es/antv → dist/slots}/Header/Logo.js +6 -2
- package/dist/slots/Header/LogoWhite.d.ts +7 -0
- package/dist/slots/Header/LogoWhite.js +19 -0
- package/dist/slots/Header/Navs.d.ts +17 -0
- package/dist/slots/Header/Navs.js +46 -0
- package/dist/slots/Header/Products/NavigatorBanner.d.ts +10 -0
- package/dist/slots/Header/Products/NavigatorBanner.js +34 -0
- package/dist/slots/Header/Products/NavigatorBanner.module.less +39 -0
- package/{es/antv → dist/slots/Header}/Products/Product.d.ts +3 -3
- package/{es/antv → dist/slots/Header}/Products/Product.js +11 -16
- package/{src/antv → dist/slots/Header}/Products/Product.module.less +10 -8
- package/{es/antv → dist/slots/Header}/Products/getProducts.d.ts +2 -7
- package/dist/slots/Header/Products/getProducts.js +67 -0
- package/dist/slots/Header/Products/index.d.ts +9 -0
- package/{es/antv → dist/slots/Header}/Products/index.js +15 -22
- package/dist/slots/Header/Search.d.ts +12 -0
- package/dist/slots/Header/Search.js +90 -0
- package/dist/slots/Header/Search.module.less +39 -0
- package/dist/slots/Header/index.d.ts +66 -0
- package/dist/slots/Header/index.js +379 -0
- package/dist/slots/Header/index.module.less +382 -0
- package/dist/slots/Header/utils.d.ts +1 -0
- package/dist/slots/Header/utils.js +26 -0
- package/dist/slots/Loading/index.d.ts +2 -0
- package/dist/slots/Loading/index.js +65 -0
- package/dist/slots/Loading/index.module.less +12 -0
- package/dist/slots/Loading.d.ts +5 -0
- package/dist/slots/Loading.js +8 -0
- package/dist/slots/ManualContent/NavigatorBanner.d.ts +9 -0
- package/dist/slots/ManualContent/NavigatorBanner.js +36 -0
- package/dist/slots/ManualContent/NavigatorBanner.module.less +39 -0
- package/dist/slots/ManualContent/ReadingTime.d.ts +3 -0
- package/dist/slots/ManualContent/ReadingTime.js +10 -0
- package/dist/slots/ManualContent/index.d.ts +9 -0
- package/dist/slots/ManualContent/index.js +321 -0
- package/dist/slots/ManualContent/index.module.less +656 -0
- package/dist/slots/TOC.d.ts +5 -0
- package/dist/slots/TOC.js +6 -0
- package/dist/slots/_.less +83 -0
- package/dist/slots/global.d.ts +1 -0
- package/dist/slots/global.js +7 -0
- package/dist/slots/hooks.d.ts +16 -0
- package/{es/antv → dist/slots}/hooks.js +60 -37
- package/dist/slots/utils.d.ts +20 -0
- package/dist/slots/utils.js +154 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +1 -0
- package/dist/typings.d.ts +140 -0
- package/package.json +108 -47
- package/es/antv/404/index.d.ts +0 -2
- package/es/antv/Banner/Banner.module.less +0 -412
- package/es/antv/Banner/Notification.d.ts +0 -10
- package/es/antv/Banner/Notification.module.less +0 -108
- package/es/antv/Banner/index.d.ts +0 -25
- package/es/antv/Banner/index.js +0 -104
- package/es/antv/Cases/Cases.module.less +0 -203
- package/es/antv/Features/FeatureCard.module.less +0 -51
- package/es/antv/Features/Features.module.less +0 -169
- package/es/antv/Footer/Footer.module.less +0 -36
- package/es/antv/Footer/index.d.ts +0 -12
- package/es/antv/Footer/index.js +0 -237
- package/es/antv/Header/Logo.d.ts +0 -4
- package/es/antv/Products/Product.module.less +0 -146
- package/es/antv/Products/getNewProducts.d.ts +0 -24
- package/es/antv/Products/getNewProducts.js +0 -35
- package/es/antv/Products/getProducts.js +0 -460
- package/es/antv/Products/index.d.ts +0 -9
- package/es/antv/hooks.d.ts +0 -14
- package/es/antv/mixins.less +0 -21
- package/es/antv/utils.d.ts +0 -5
- package/es/antv/utils.js +0 -49
- package/es/builtins/API.d.ts +0 -3
- package/es/builtins/API.js +0 -37
- package/es/builtins/Alert.d.ts +0 -3
- package/es/builtins/Alert.js +0 -7
- package/es/builtins/Alert.less +0 -62
- package/es/builtins/Badge.d.ts +0 -3
- package/es/builtins/Badge.js +0 -7
- package/es/builtins/Badge.less +0 -31
- package/es/builtins/Example.d.ts +0 -5
- package/es/builtins/Example.less +0 -47
- package/es/builtins/Previewer.d.ts +0 -39
- package/es/builtins/Previewer.js +0 -225
- package/es/builtins/Previewer.less +0 -406
- package/es/builtins/SourceCode.d.ts +0 -10
- package/es/builtins/SourceCode.js +0 -70
- package/es/builtins/SourceCode.less +0 -103
- package/es/builtins/Table.d.ts +0 -4
- package/es/builtins/Table.less +0 -43
- package/es/builtins/Tree.d.ts +0 -4
- package/es/builtins/Tree.js +0 -213
- package/es/builtins/Tree.less +0 -159
- package/es/components/Dark.d.ts +0 -9
- package/es/components/Dark.js +0 -125
- package/es/components/Dark.less +0 -121
- package/es/components/LocaleSelect.d.ts +0 -6
- package/es/components/LocaleSelect.js +0 -53
- package/es/components/LocaleSelect.less +0 -59
- package/es/components/Navbar.d.ts +0 -10
- package/es/components/Navbar.js +0 -155
- package/es/components/Navbar.less +0 -180
- package/es/components/SearchBar.d.ts +0 -4
- package/es/components/SearchBar.js +0 -81
- package/es/components/SearchBar.less +0 -165
- package/es/components/SideMenu.d.ts +0 -10
- package/es/components/SideMenu.js +0 -99
- package/es/components/SideMenu.less +0 -379
- package/es/components/SlugList.d.ts +0 -7
- package/es/components/SlugList.js +0 -38
- package/es/components/SlugList.less +0 -18
- package/es/declaration.d.ts +0 -1
- package/es/layout.d.ts +0 -5
- package/es/layout.js +0 -276
- package/es/style/layout.less +0 -402
- package/es/style/markdown.less +0 -240
- package/es/style/variables.less +0 -37
- package/src/antv/404/index.tsx +0 -25
- package/src/antv/Banner/Notification.tsx +0 -45
- package/src/antv/Banner/index.tsx +0 -139
- package/src/antv/Cases/Cases.tsx +0 -116
- package/src/antv/Features/FeatureCard.tsx +0 -24
- package/src/antv/Features/index.tsx +0 -86
- package/src/antv/Footer/Footer.module.less +0 -36
- package/src/antv/Footer/index.tsx +0 -272
- package/src/antv/Header/Logo.tsx +0 -85
- package/src/antv/Products/Product.tsx +0 -80
- package/src/antv/Products/getNewProducts.tsx +0 -53
- package/src/antv/Products/getProducts.tsx +0 -626
- package/src/antv/Products/index.tsx +0 -70
- package/src/antv/hooks.ts +0 -87
- package/src/antv/mixins.less +0 -21
- package/src/antv/utils.ts +0 -44
- package/src/builtins/API.tsx +0 -57
- package/src/builtins/Alert.less +0 -62
- package/src/builtins/Alert.tsx +0 -4
- package/src/builtins/Badge.less +0 -31
- package/src/builtins/Badge.tsx +0 -4
- package/src/builtins/Example.less +0 -47
- package/src/builtins/Example.tsx +0 -34
- package/src/builtins/Previewer.less +0 -406
- package/src/builtins/Previewer.tsx +0 -264
- package/src/builtins/SourceCode.less +0 -103
- package/src/builtins/SourceCode.tsx +0 -55
- package/src/builtins/Table.less +0 -43
- package/src/builtins/Table.tsx +0 -42
- package/src/builtins/Tree.less +0 -159
- package/src/builtins/Tree.tsx +0 -130
- package/src/components/Dark.less +0 -121
- package/src/components/Dark.tsx +0 -78
- package/src/components/LocaleSelect.less +0 -59
- package/src/components/LocaleSelect.tsx +0 -53
- package/src/components/Navbar.less +0 -180
- package/src/components/Navbar.tsx +0 -152
- package/src/components/SearchBar.less +0 -165
- package/src/components/SearchBar.tsx +0 -68
- package/src/components/SideMenu.less +0 -379
- package/src/components/SideMenu.tsx +0 -148
- package/src/components/SlugList.less +0 -18
- package/src/components/SlugList.tsx +0 -20
- package/src/declaration.d.ts +0 -1
- package/src/layout.tsx +0 -225
- package/src/style/layout.less +0 -402
- package/src/style/markdown.less +0 -240
- package/src/style/variables.less +0 -37
- package/src/test/SearchBar.test.ts +0 -32
- package/src/test/Table.test.tsx +0 -41
- package/src/test/index.test.tsx +0 -377
package/es/style/markdown.less
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
@import (reference) './variables.less';
|
|
2
|
-
|
|
3
|
-
.markdown {
|
|
4
|
-
color: @c-text;
|
|
5
|
-
font-size: 15px;
|
|
6
|
-
line-height: 1.60625;
|
|
7
|
-
|
|
8
|
-
[data-prefers-color=dark] & {
|
|
9
|
-
color: @c-secondary-dark;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&:not(:first-child):empty {
|
|
13
|
-
min-height: 32px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// titles
|
|
17
|
-
h1,
|
|
18
|
-
h2,
|
|
19
|
-
h3,
|
|
20
|
-
h4,
|
|
21
|
-
h5,
|
|
22
|
-
h6 {
|
|
23
|
-
margin: 42px 0 18px;
|
|
24
|
-
color: @c-heading;
|
|
25
|
-
font-weight: 500;
|
|
26
|
-
line-height: 1.40625;
|
|
27
|
-
|
|
28
|
-
[data-prefers-color=dark] & {
|
|
29
|
-
color: @c-heading-dark;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// anchor link
|
|
33
|
-
&:hover > a[aria-hidden] {
|
|
34
|
-
float: left;
|
|
35
|
-
margin-top: 0.06em;
|
|
36
|
-
margin-left: -20px;
|
|
37
|
-
width: 20px;
|
|
38
|
-
padding-right: 4px;
|
|
39
|
-
line-height: 1;
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
|
|
42
|
-
@media @mobile {
|
|
43
|
-
width: 14px;
|
|
44
|
-
margin-left: -14px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&::after {
|
|
48
|
-
content: '#';
|
|
49
|
-
display: inline-block;
|
|
50
|
-
vertical-align: middle;
|
|
51
|
-
font-size: 20px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
span {
|
|
55
|
-
display: none;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
+ h1,
|
|
60
|
-
+ h2,
|
|
61
|
-
+ h3,
|
|
62
|
-
+ h4,
|
|
63
|
-
+ h5,
|
|
64
|
-
+ h6 {
|
|
65
|
-
margin-top: 16px;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
h1 {
|
|
70
|
-
margin-top: 48px;
|
|
71
|
-
margin-bottom: 32px;
|
|
72
|
-
font-size: 32px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
h2 {
|
|
76
|
-
font-size: 24px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
h3 {
|
|
80
|
-
font-size: 20px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
h4 {
|
|
84
|
-
font-size: 18px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
h5 {
|
|
88
|
-
font-size: 16px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
h6 {
|
|
92
|
-
font-size: 14px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// paragraph
|
|
96
|
-
p {
|
|
97
|
-
margin: 16px 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// inline code
|
|
101
|
-
*:not(pre) code {
|
|
102
|
-
padding: 2px 5px;
|
|
103
|
-
color: #d56161;
|
|
104
|
-
background: darken(@c-light-bg, 1%);
|
|
105
|
-
|
|
106
|
-
[data-prefers-color=dark] & {
|
|
107
|
-
color: #ff7875;
|
|
108
|
-
background: @c-light-bg-dark;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
code {
|
|
113
|
-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// code block
|
|
117
|
-
pre {
|
|
118
|
-
font-size: 14px;
|
|
119
|
-
background: darken(@c-light-bg, 1%);
|
|
120
|
-
|
|
121
|
-
&:not([class^='language-']) {
|
|
122
|
-
padding: 1em;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// horizontal line
|
|
127
|
-
hr {
|
|
128
|
-
margin: 16px 0;
|
|
129
|
-
border: 0;
|
|
130
|
-
border-top: 1px solid @c-border;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// blockquote
|
|
134
|
-
blockquote {
|
|
135
|
-
margin: 16px 0;
|
|
136
|
-
padding: 0 24px;
|
|
137
|
-
color: fadeout(@c-text, 30%);
|
|
138
|
-
border-left: 4px solid @c-border;
|
|
139
|
-
overflow: hidden;
|
|
140
|
-
|
|
141
|
-
[data-prefers-color=dark] & {
|
|
142
|
-
color: fadeout(@c-text-dark, 30%);
|
|
143
|
-
border-color: @c-border-dark;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// list
|
|
148
|
-
ul,
|
|
149
|
-
ol {
|
|
150
|
-
margin: 8px 0 8px 32px;
|
|
151
|
-
padding: 0;
|
|
152
|
-
|
|
153
|
-
li {
|
|
154
|
-
margin-bottom: 4px;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// table
|
|
159
|
-
table {
|
|
160
|
-
width: 100%;
|
|
161
|
-
border-collapse: collapse;
|
|
162
|
-
border: 1px solid @c-border;
|
|
163
|
-
|
|
164
|
-
[data-prefers-color=dark] & {
|
|
165
|
-
border: 1px solid #3b434b;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
th,
|
|
169
|
-
td {
|
|
170
|
-
padding: 10px 24px;
|
|
171
|
-
border: 1px solid @c-border;
|
|
172
|
-
|
|
173
|
-
[data-prefers-color=dark] & {
|
|
174
|
-
border: 1px solid #3b434b;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
th {
|
|
179
|
-
font-weight: 600;
|
|
180
|
-
background: @c-light-bg;
|
|
181
|
-
|
|
182
|
-
[data-prefers-color=dark] & {
|
|
183
|
-
background: @c-light-bg-dark;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
td:first-child {
|
|
188
|
-
font-weight: 500;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
a {
|
|
192
|
-
svg {
|
|
193
|
-
display: none;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// links
|
|
199
|
-
a {
|
|
200
|
-
color: @c-link;
|
|
201
|
-
text-decoration: none;
|
|
202
|
-
transition: opacity 0.2s;
|
|
203
|
-
outline: none;
|
|
204
|
-
|
|
205
|
-
[data-prefers-color=dark] & {
|
|
206
|
-
color: @c-primary-dark;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
&:hover {
|
|
210
|
-
opacity: 0.7;
|
|
211
|
-
text-decoration: underline;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
&:active {
|
|
215
|
-
opacity: 0.9;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// images
|
|
220
|
-
img {
|
|
221
|
-
max-width: 100%;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.@{prefix} {
|
|
226
|
-
&-external-link-icon {
|
|
227
|
-
vertical-align: -0.155em;
|
|
228
|
-
margin-left: 2px;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// For demo
|
|
233
|
-
[data-prefers-color=dark] {
|
|
234
|
-
h1,
|
|
235
|
-
h2,
|
|
236
|
-
h3,
|
|
237
|
-
h4 {
|
|
238
|
-
color: @c-heading-dark;
|
|
239
|
-
}
|
|
240
|
-
}
|
package/es/style/variables.less
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/* 颜色表 */
|
|
2
|
-
@c-primary: #4569d4;
|
|
3
|
-
@c-heading: #454d64;
|
|
4
|
-
@c-text: #454d64;
|
|
5
|
-
@c-secondary: #717484;
|
|
6
|
-
@c-link: @c-primary;
|
|
7
|
-
@c-border: #ebedf1;
|
|
8
|
-
@c-btn-border: #dadadf;
|
|
9
|
-
@c-light-bg: #f9fafb;
|
|
10
|
-
|
|
11
|
-
/* 尺寸表 */
|
|
12
|
-
@s-nav-height: 64px;
|
|
13
|
-
@s-mobile-nav-height: 50px;
|
|
14
|
-
@s-menu-width: 260px;
|
|
15
|
-
@s-site-menu-width: 300px;
|
|
16
|
-
@s-menu-mobile-width: 240px;
|
|
17
|
-
@s-content-margin: 58px;
|
|
18
|
-
|
|
19
|
-
@img-logo: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACCCAMAAACww5CIAAACf1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8YkP8AAAACCxMamv/6+voaGhoXi/YYjv8aoP8cq/8dr/8bo/8cqP8bpv8Ykv8drv8BAwUcrP8Zlf8Xjf/s7OzLy8scp/8anP8ZmP/d3d0BBArg4ODT09O7u7sEGCsKCgoanf8YlP/8/Pz09PTIyMgMTIV1dXUGKEVEREQ0NDQODg4GBgYdsv8dsf8Zl//m5uYVgOXj4+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XqWYKHupMgAAAABJRU5ErkJggg==';
|
|
20
|
-
@prefix: __dumi-default;
|
|
21
|
-
@mobile: ~'only screen and (max-width: 767px)';
|
|
22
|
-
@desktop: ~'only screen and (min-width: 768px)';
|
|
23
|
-
@icons: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcwAAAA8CAMAAADc4HoZAAABFFBMVEUAAABGT2VGTmZaYXpCvGtIUGg3tGBGTmU3s2A/tmFKUGxFTmRFTWVQWmxFTWRJUGZFTWRGTmRLWWpFTWRGTmVGTmVLVG1FTmRGTWVHTmVFTWRHUGdFTWRGT2ZFTWVGTmU6t2I7xHA3tF9GTWRIT2dFTmRGTmVFTWQ3s2BFTWRGTmVGTmZKUmVFTWRFTWRGTWRGTmVcXHxFTmVFTmVGTmVFTWRIUGdGTWVNU3FGT2ZGTmVHTmVFTWRFTWVFTmVITWRHUGZFTWVFTmRGTmZGTmVFTWVLU2g4tF83tGBFTWQ3s1/LzdT09faoq7Zwdoieoq58gpLj5OeCh5fq6+2/wsmTmKWQlKJfZnpIUGfU1tu0t8BOVWynlyFSAAAASXRSTlMAkoAHEkDQ/dgYFuf0C8gj+KQQmm1oEuyNWNg53kSXfCYI5tEtzq7ivbOgTBy924R1BfHUibcpYw1JcU7v+7E3Nav6XVPDGraPqQuKawAACh1JREFUeNrsm2lT6kgUhg9QFFUkgWDYZfnAVsi+KQJeQdGqt1xm7jZ3lv//PyYdhe7QWQw1zP0w83xQsY9Um4fTp7vToeBczmaX5MN5rXZO/+NGJzGuLejnkw3dADehLHkQyceAWD5C/0my9XqWPLlCK9WHQScirUMk18g7J9ZosYLFajFyT8siLIpuyQkHKBDw4NgYsnDr0Xybaii60rjYzsmdbrqnw0TvpbvkhjYuzinygDXJXLewR2/O/f73w1cWCUj0LkmiU8SeYsc9LXMZIJNjyXkqmbWQCzV8ICawzLO8jh3q4IyciYfugMnMMGYT4C4UJ2fOEbbSc0EyrVp4T/7u4kiZs6jANjwBxkupWMLG7NIlLZvxM+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IcTxkJnuTOMV1ZBxkniceqYkmnRmtR4ooQWVSJwbD16b/LbAGTEffnvD705NpC3lZphxzrEwbYVZg2Dd+c9pZZpCb08FltrChj8nsAGpiDD0py9RWUIvAkFWOuwcFuA0ok4bALCuKswQFvTk9gMnL85fvz99h0ttsmp8+tdt9LlOKuXC5OS1fOa42c3jUUrW6sIGetB8bwVCUuUCgYyPBZa6B+w/KpHsVgOq4adBhTQ8RonIOwE3ACRBjGMNquJ/ODcc9YgQ8NtJVYfLn568vMImtVrmcoiitVmLuFON6bMRfpiOPY/QOD3T16juZ9V6AA10+MhkkE0Ys6yuzXFgTY35fzTw6L03iV8MOMbTt8CpJwWVa02C9PSyUt8NPKtBK0hEHuoYAzAH0G0z0c+IEjIGALDMfdeYCuD88ahmrxJnMuBE77qilLHPkKnOZlhLz9CcNnFu06hg7lLBGRx21DMHkr9+ZJ6HFKya4TC9atIOf6woBIX6SK8AhaM8D0D//ELR3ryLXlV4xV0qElhEiz0PQbcNoOx+CvlJgIT6H4xUTHCMGd1LE4aVTKpa+jyf4y/z5jycE7lXwxxO0gtFu5svECRrz/4NDf7dvxjYQwzAMdGEE8RaWq2ySh/cf6OGoyQCRANLkBHenWqnzxyGU6aVP0zRN0zTtmzUru64ZWZ923kC0n6tT9WnnnL+y5R51pj6L9ahlx7k6UR8kVt2Sh1W35GHVLXlYdUseVt2Sh1W3fK8aDmuSOmyfelyGwpqkjtvnnvMyENYcdeA+fSxaDNYUdeg+TovBmqAO3sdpMVjD1eH7OC0Ga7A6QR+nxWANVafo47QYrIHqJH0eWhDWMHWaPosWhTVInahPHzisIepUffrAYQ1QJ+vTgVgD1IP6/AHM0QJdY511NAAAAABJRU5ErkJggg==';
|
|
24
|
-
|
|
25
|
-
.@{prefix}-icon {
|
|
26
|
-
background: url(@icons) no-repeat ~'0 0/230px auto';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* 颜色表 - dark */
|
|
30
|
-
@c-bg-dark: #141414;
|
|
31
|
-
@c-light-bg-dark: rgba(255,255,255,0.08);
|
|
32
|
-
@c-primary-dark: #7395f7;
|
|
33
|
-
@c-heading-dark: rgba(255, 255, 255, 0.85);
|
|
34
|
-
@c-text-dark: rgba(255, 255, 255, 0.85);
|
|
35
|
-
@c-secondary-dark: rgba(255,255,255,0.65);
|
|
36
|
-
@c-border-dark: #6b6c6d;
|
|
37
|
-
@c-btn-border-dark: #464646;
|
package/src/antv/404/index.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { HomeOutlined } from '@ant-design/icons';
|
|
3
|
-
import { Result, Button } from 'antd';
|
|
4
|
-
import { Link } from 'dumi/theme';
|
|
5
|
-
|
|
6
|
-
const NotFoundPage = () => (
|
|
7
|
-
<>
|
|
8
|
-
<Result
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
status={'404' as any}
|
|
11
|
-
title="404"
|
|
12
|
-
subTitle="Sorry, the page you visited does not exist."
|
|
13
|
-
extra={
|
|
14
|
-
<Link to="/">
|
|
15
|
-
<Button type="primary">
|
|
16
|
-
<HomeOutlined />
|
|
17
|
-
Back Home
|
|
18
|
-
</Button>
|
|
19
|
-
</Link>
|
|
20
|
-
}
|
|
21
|
-
/>
|
|
22
|
-
</>
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export default NotFoundPage;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import styles from './Notification.module.less';
|
|
5
|
-
|
|
6
|
-
export interface NotificationProps {
|
|
7
|
-
index?: number;
|
|
8
|
-
type: string;
|
|
9
|
-
title: string;
|
|
10
|
-
date: string;
|
|
11
|
-
link: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const numberImages = [
|
|
15
|
-
'https://gw.alipayobjects.com/zos/antfincdn/IqREAm36K7/1.png',
|
|
16
|
-
'https://gw.alipayobjects.com/zos/antfincdn/3fG1Iqjfnz/2.png',
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
const Notification: React.FC<NotificationProps> = ({ index = 0, type, title, date, link = '' }) => {
|
|
20
|
-
const children = (
|
|
21
|
-
<div className={styles.container}>
|
|
22
|
-
<img className={styles.number} src={numberImages[index]} alt={index.toString()} />
|
|
23
|
-
<div className={styles.content}>
|
|
24
|
-
<p className={styles.description}>
|
|
25
|
-
{type} ‧ {title}
|
|
26
|
-
</p>
|
|
27
|
-
<p className={styles.date}>{date}</p>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
if (link.startsWith('http')) {
|
|
32
|
-
return (
|
|
33
|
-
<a href={link} target="_blank" rel="noopener noreferrer" className={styles.notification}>
|
|
34
|
-
{children}
|
|
35
|
-
</a>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
return (
|
|
39
|
-
<Link to={link} className={styles.notification}>
|
|
40
|
-
{children}
|
|
41
|
-
</Link>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default Notification;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import { context } from "dumi/theme";
|
|
3
|
-
import gh from "parse-github-url";
|
|
4
|
-
import React, { useContext } from "react";
|
|
5
|
-
import GitHubButton from "react-github-button";
|
|
6
|
-
//@ts-ignore
|
|
7
|
-
import styles from "./Banner.module.less";
|
|
8
|
-
import Notification, { NotificationProps } from "./Notification";
|
|
9
|
-
type BannerButtonShape = "round" | "square";
|
|
10
|
-
|
|
11
|
-
interface BannerButton {
|
|
12
|
-
text: string;
|
|
13
|
-
link: string;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
type?: string;
|
|
16
|
-
shape?: BannerButtonShape;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface BannerProps {
|
|
20
|
-
coverImage?: React.ReactNode;
|
|
21
|
-
title: string;
|
|
22
|
-
description: string;
|
|
23
|
-
notifications?: NotificationProps[];
|
|
24
|
-
style?: React.CSSProperties;
|
|
25
|
-
className?: string;
|
|
26
|
-
video?: string;
|
|
27
|
-
showGithubStars?: boolean;
|
|
28
|
-
buttons?: BannerButton[];
|
|
29
|
-
onCloseVideo?: () => void;
|
|
30
|
-
onPlayVideo?: () => void;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const backLeftBottom =
|
|
34
|
-
"https://gw.alipayobjects.com/zos/basement_prod/441d5eaf-e623-47cd-b9b9-2a581d9ce1e3.svg";
|
|
35
|
-
|
|
36
|
-
const Banner: React.FC<BannerProps> = ({
|
|
37
|
-
coverImage,
|
|
38
|
-
title,
|
|
39
|
-
description,
|
|
40
|
-
notifications,
|
|
41
|
-
style = {},
|
|
42
|
-
className,
|
|
43
|
-
showGithubStars = true,
|
|
44
|
-
buttons = [],
|
|
45
|
-
}) => {
|
|
46
|
-
const {
|
|
47
|
-
config: { repository },
|
|
48
|
-
} = useContext(context);
|
|
49
|
-
|
|
50
|
-
const githubUrl = repository.url;
|
|
51
|
-
|
|
52
|
-
const notificationsNode = notifications
|
|
53
|
-
.slice(0, 2)
|
|
54
|
-
.map((notification, i) => (
|
|
55
|
-
<Notification index={i} key={i} {...notification} />
|
|
56
|
-
));
|
|
57
|
-
|
|
58
|
-
const renderButtons = buttons.map((button: BannerButton, i) => {
|
|
59
|
-
const ButtonLink = "a";
|
|
60
|
-
const buttonProps = {} as any;
|
|
61
|
-
if (button.link.startsWith("http")) {
|
|
62
|
-
buttonProps.target = "_blank";
|
|
63
|
-
buttonProps.rel = "noopener noreferrer";
|
|
64
|
-
}
|
|
65
|
-
if (ButtonLink === "a") {
|
|
66
|
-
buttonProps.href = button.link;
|
|
67
|
-
} else {
|
|
68
|
-
buttonProps.to = button.link;
|
|
69
|
-
}
|
|
70
|
-
const { shape = "round" } = button;
|
|
71
|
-
return (
|
|
72
|
-
<ButtonLink
|
|
73
|
-
{...buttonProps}
|
|
74
|
-
className={classNames(
|
|
75
|
-
styles.buttonLink,
|
|
76
|
-
styles[button.type || ""],
|
|
77
|
-
button.type === "primary" ? "primary-button" : "common-button"
|
|
78
|
-
)}
|
|
79
|
-
key={i}
|
|
80
|
-
style={{
|
|
81
|
-
borderRadius: shape === "round" ? "1000px" : "4px",
|
|
82
|
-
...button.style,
|
|
83
|
-
}}
|
|
84
|
-
>
|
|
85
|
-
<span className={styles.button}>{button.text}</span>
|
|
86
|
-
</ButtonLink>
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
if (showGithubStars) {
|
|
91
|
-
const githubObj = gh(githubUrl);
|
|
92
|
-
|
|
93
|
-
if (githubObj && githubObj.owner && githubObj.name) {
|
|
94
|
-
renderButtons.push(
|
|
95
|
-
<div key="github" className={styles.githubWrapper}>
|
|
96
|
-
<GitHubButton
|
|
97
|
-
type="stargazers"
|
|
98
|
-
size="large"
|
|
99
|
-
namespace={githubObj.owner}
|
|
100
|
-
repo={githubObj.name}
|
|
101
|
-
/>
|
|
102
|
-
</div>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<section className={classNames(styles.wrapper, className)} style={style}>
|
|
109
|
-
<div className={styles.content}>
|
|
110
|
-
<div className={styles.text}>
|
|
111
|
-
<div className={classNames(styles.title, "banner-title")}>
|
|
112
|
-
{title}
|
|
113
|
-
</div>
|
|
114
|
-
<div className={classNames(styles.description, "banner-description")}>
|
|
115
|
-
{description}
|
|
116
|
-
</div>
|
|
117
|
-
<div className={classNames(styles.buttons, "banner-buttons")}>
|
|
118
|
-
{renderButtons}
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<div className={classNames(styles.notifications, "notifications")}>
|
|
122
|
-
{notificationsNode}
|
|
123
|
-
</div>
|
|
124
|
-
<div className={classNames(styles.teaser, "teaser")}>
|
|
125
|
-
<div className={classNames(styles.teaserimg, "teaser-img")}>
|
|
126
|
-
{coverImage}
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
<img
|
|
130
|
-
className={styles.backLeftBottom}
|
|
131
|
-
src={backLeftBottom}
|
|
132
|
-
alt="back"
|
|
133
|
-
/>
|
|
134
|
-
</div>
|
|
135
|
-
</section>
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export default Banner;
|
package/src/antv/Cases/Cases.tsx
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons';
|
|
4
|
-
import { Link } from 'react-router-dom';
|
|
5
|
-
import Slider from 'react-slick';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import 'slick-carousel/slick/slick.css';
|
|
8
|
-
import 'slick-carousel/slick/slick-theme.css';
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
import styles from './Cases.module.less';
|
|
11
|
-
|
|
12
|
-
interface Case {
|
|
13
|
-
logo?: string;
|
|
14
|
-
isAppLogo?: boolean;
|
|
15
|
-
title: string;
|
|
16
|
-
description: string;
|
|
17
|
-
link?: string;
|
|
18
|
-
image: string;
|
|
19
|
-
}
|
|
20
|
-
interface CasesProps {
|
|
21
|
-
cases: Case[];
|
|
22
|
-
style?: React.CSSProperties;
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
const Cases: React.FC<CasesProps> = ({ cases = [], style = {}, className }) => {
|
|
26
|
-
let slider: any;
|
|
27
|
-
|
|
28
|
-
const clickPrevious = () => {
|
|
29
|
-
slider.slickPrev();
|
|
30
|
-
};
|
|
31
|
-
const clickNext = () => {
|
|
32
|
-
slider.slickNext();
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const getCases = () => {
|
|
36
|
-
let buttons: any;
|
|
37
|
-
if (cases.length > 1) {
|
|
38
|
-
buttons = (
|
|
39
|
-
<div className={styles.buttons}>
|
|
40
|
-
<div className={styles.controlButton} onClick={clickPrevious}>
|
|
41
|
-
<ArrowLeftOutlined className={styles.controlButtonIcon} style={{ fontSize: '16px' }} />
|
|
42
|
-
</div>
|
|
43
|
-
<div className={styles.controlButton} onClick={clickNext} style={{ marginLeft: '-1px' }}>
|
|
44
|
-
<ArrowRightOutlined className={styles.controlButtonIcon} style={{ fontSize: '16px' }} />
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
const children = cases.map(app => {
|
|
50
|
-
const linkDiv = (
|
|
51
|
-
<div className={styles.detailWrapper} style={{ display: app.link ? 'block' : 'none' }}>
|
|
52
|
-
{app.link && app.link.startsWith('http') ? (
|
|
53
|
-
<a className={styles.detail} href={app.link} target="_blank" rel="noopener noreferrer">
|
|
54
|
-
查看详情
|
|
55
|
-
</a>
|
|
56
|
-
) : (
|
|
57
|
-
<Link className={styles.detail} to={app.link ? app.link : ''}>
|
|
58
|
-
查看详情
|
|
59
|
-
</Link>
|
|
60
|
-
)}
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
return (
|
|
65
|
-
<div className={styles.appWrapper} key={app.title}>
|
|
66
|
-
<img className={styles.appTeaser} src={app.image} alt={app.title} />
|
|
67
|
-
<div className={styles.appLeft}>
|
|
68
|
-
<div className={styles.appContent}>
|
|
69
|
-
<img
|
|
70
|
-
className={styles.appLogo}
|
|
71
|
-
src={app.logo}
|
|
72
|
-
alt="logo"
|
|
73
|
-
style={{
|
|
74
|
-
borderRadius: app.isAppLogo ? '15px' : '0px',
|
|
75
|
-
boxShadow: app.isAppLogo ? '0px 12px 24px #CED4D9' : '0px 0px 0px',
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
<p className={styles.appTitle}>{app.title}</p>
|
|
79
|
-
<p className={styles.appDescription}>{app.description}</p>
|
|
80
|
-
{linkDiv}
|
|
81
|
-
</div>
|
|
82
|
-
{buttons}
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
);
|
|
86
|
-
});
|
|
87
|
-
return children;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const sliderSettings = {
|
|
91
|
-
dots: cases.length > 1,
|
|
92
|
-
infinite: true,
|
|
93
|
-
slidesToShow: 1,
|
|
94
|
-
adaptiveHeight: true,
|
|
95
|
-
speed: 500,
|
|
96
|
-
cssEase: 'linear',
|
|
97
|
-
arrows: false,
|
|
98
|
-
autoplay: true,
|
|
99
|
-
autoplaySpeed: 3000,
|
|
100
|
-
fade: true,
|
|
101
|
-
};
|
|
102
|
-
return (
|
|
103
|
-
<div className={classNames(styles.wrapper, className)} style={style}>
|
|
104
|
-
<Slider
|
|
105
|
-
{...sliderSettings}
|
|
106
|
-
className={styles.slider}
|
|
107
|
-
ref={c => {
|
|
108
|
-
slider = c;
|
|
109
|
-
}}
|
|
110
|
-
>
|
|
111
|
-
{getCases()}
|
|
112
|
-
</Slider>
|
|
113
|
-
</div>
|
|
114
|
-
);
|
|
115
|
-
};
|
|
116
|
-
export default Cases;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import styles from './FeatureCard.module.less';
|
|
5
|
-
|
|
6
|
-
interface FeatureProps {
|
|
7
|
-
icon: string;
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const FeatureCard: React.FC<FeatureProps> = ({ icon, title, description }) => {
|
|
13
|
-
return (
|
|
14
|
-
<div className={styles.card}>
|
|
15
|
-
<div className={styles.content}>
|
|
16
|
-
<img className={classNames(styles.icon, 'feature-logo')} src={icon} alt="advantage" />
|
|
17
|
-
<p className={styles.title}>{title}</p>
|
|
18
|
-
<p className={styles.description}>{description}</p>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default FeatureCard;
|