Skip to content

Commit 34ed8e3

Browse files
CORE: add tutorial button (#768)
* CORE: add tutorial button * CORE: fix styles
1 parent 3af216c commit 34ed8e3

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

src/modules/documentation-membership/documentation-membership.jsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const DocumentationMembership = ({
1616
mulltyDocs,
1717
handleContentOpen,
1818
videoIcon,
19+
tutorialIcon,
20+
tutorial,
1921
redirectLink,
2022
showNavigator,
2123
handleScrollToTop,
@@ -40,7 +42,24 @@ const DocumentationMembership = ({
4042
[styles.innerSpacing]: mulltyDocs,
4143
})}
4244
>
43-
<div className={styles.docsTitle}>{docsTitle}</div>
45+
<div className={styles.headerWrapper}>
46+
<div className={styles.docsTitle}>{docsTitle}</div>
47+
{/* eslint-disable-next-line max-len */}
48+
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
49+
<div
50+
className={styles.videoWrapper}
51+
rel="noreferrer"
52+
onClick={() =>
53+
handleContentOpen({
54+
src: tutorial.src,
55+
title: tutorial.title,
56+
})
57+
}
58+
>
59+
{tutorial.text}
60+
<img src={tutorialIcon} alt="video icon" />
61+
</div>
62+
</div>
4463
{docs?.map((item, index) => (
4564
<>
4665
{item.divider && <div className={styles.divider} />}

src/modules/documentation-membership/styles.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@
270270
margin: 8px 0;
271271
}
272272

273+
.header-wrapper {
274+
display: flex;
275+
align-items: center;
276+
justify-content: space-between;
277+
}
278+
273279
.docs-title {
274280
padding: 0 0 16px;
275281
font-size: 22px;
@@ -279,6 +285,25 @@
279285
color: #212121;
280286
}
281287

288+
.video-wrapper {
289+
display: flex;
290+
align-items: center;
291+
padding: 16px;
292+
font-size: 16px;
293+
font-style: normal;
294+
font-weight: 500;
295+
line-height: 130%;
296+
color: #b75400;
297+
cursor: pointer;
298+
background: #fef5ef;
299+
border-radius: 4px;
300+
gap: 10px;
301+
}
302+
303+
.video-wrapper:hover {
304+
text-decoration: none;
305+
}
306+
282307

283308
.tutorial-wrapper {
284309
display: flex;

0 commit comments

Comments
 (0)