Skip to content

Commit bf9553a

Browse files
authored
Merge pull request #587 from topcoder-platform/TCA-1106_certificate_sharing
TCA-1106 - update label for share btn -> dev
2 parents 5c5b18e + 105893b commit bf9553a

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

src-ts/tools/learn/learn-lib/action-button/ActionButton.module.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
@import '../../../../lib/styles/includes';
22

33
.wrap {
4-
@include icon-mxx;
5-
border-radius: 50%;
4+
min-width: $space-mxx;
5+
height: $space-mxx;
6+
border-radius: calc($space-mxx/2);
67

78
color: $tc-white;
89
border: $border solid currentColor;
910

1011
display: flex;
1112
align-items: center;
1213
justify-content: center;
14+
gap: $space-xs;
1315

1416
padding: $space-sm;
1517

@@ -23,3 +25,14 @@
2325
@include icon-mx;
2426
}
2527
}
28+
29+
.label {
30+
@include font-roboto;
31+
display: block;
32+
text-transform: uppercase;
33+
font-weight: 700;
34+
font-size: 16px;
35+
line-height: 18px;
36+
letter-spacing: 0.008em;
37+
padding-right: $space-xs;
38+
}

src-ts/tools/learn/learn-lib/action-button/ActionButton.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import classNames from 'classnames'
44
import styles from './ActionButton.module.scss'
55

66
interface ActionButtonProps {
7+
children?: ReactNode
78
className?: string
89
icon: ReactNode
910
onClick?: () => void
@@ -12,6 +13,11 @@ interface ActionButtonProps {
1213
}
1314

1415
const ActionButton: FC<ActionButtonProps> = (props: ActionButtonProps) => {
16+
const label: ReactNode = props.children && (
17+
<span className={styles.label}>
18+
{props.children}
19+
</span>
20+
)
1521

1622
// if there is a url, this is a link button
1723
if (!!props.url) {
@@ -24,6 +30,7 @@ const ActionButton: FC<ActionButtonProps> = (props: ActionButtonProps) => {
2430
target={props.target}
2531
>
2632
{props.icon}
33+
{label}
2734
</a>
2835
)
2936
}
@@ -34,6 +41,7 @@ const ActionButton: FC<ActionButtonProps> = (props: ActionButtonProps) => {
3441
onClick={props.onClick}
3542
>
3643
{props.icon}
44+
{label}
3745
</div>
3846
)
3947
}

src-ts/tools/learn/learn-lib/certificate-page-layout/CertificatePageLayout.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
.btns-wrap {
3030
display: flex;
3131
flex-direction: column;
32-
align-items: center;
32+
align-items: flex-start;
3333
z-index: 1;
3434
position: relative;
3535

src-ts/tools/learn/learn-lib/certificate-page-layout/CertificatePageLayout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ const CertificatePageLayout: FC<CertificatePageLayoutProps> = (props: Certificat
132132
<ActionButton
133133
icon={<IconOutline.ShareIcon />}
134134
onClick={shareModal.show}
135-
/>
135+
>
136+
Share certificate
137+
</ActionButton>
136138
</div>
137139
)}
138140
</div>

0 commit comments

Comments
 (0)