Skip to content

Commit 4d855e2

Browse files
authored
fix: tabs styles (#107)
1 parent b17e67b commit 4d855e2

File tree

11 files changed

+97
-47
lines changed

11 files changed

+97
-47
lines changed

deployment/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ helm install starkgate starkware/webapp-general-helm \
5050

5151
> **Note:** Upgrade only if you already run `helm install`
5252
53-
5453
Upgrade starknet faucet helm chart.
5554

5655
### Production

src/components/Containers/Header/Header.js

+19-17
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const Header = () => {
3838
};
3939

4040
const onTabDiscordClick = () => {
41-
utils.browser.openInNewTab(DISCORD_LINK_URL, DISCORD_LINK_URL);
41+
utils.browser.openInNewTab(DISCORD_LINK_URL);
4242
};
4343

4444
return (
@@ -54,23 +54,25 @@ export const Header = () => {
5454

5555
<div className={utils.object.toClasses(styles.right, 'row')}>
5656
<div className={styles.tabs}>
57-
<Tab label={TAB_FAQ_TXT} onClick={showFaqMenu}></Tab>
58-
<Tab label={TAB_DISCORD_TXT} onClick={onTabDiscordClick}></Tab>
57+
<Tab label={TAB_FAQ_TXT} onClick={showFaqMenu} />
58+
<Tab isLink={true} label={TAB_DISCORD_TXT} onClick={onTabDiscordClick} />
59+
</div>
60+
<div className={styles.walletButtons}>
61+
{isL1AccountConnected && (
62+
<WalletButton
63+
account={l1Account}
64+
logoPath={l1Config?.logoPath}
65+
onClick={onL1WalletButtonClick}
66+
/>
67+
)}
68+
{isL2AccountConnected && (
69+
<WalletButton
70+
account={l2Account}
71+
logoPath={l2Config?.logoPath}
72+
onClick={onL2WalletButtonClick}
73+
/>
74+
)}
5975
</div>
60-
{isL1AccountConnected && (
61-
<WalletButton
62-
account={l1Account}
63-
logoPath={l1Config?.logoPath}
64-
onClick={onL1WalletButtonClick}
65-
/>
66-
)}
67-
{isL2AccountConnected && (
68-
<WalletButton
69-
account={l2Account}
70-
logoPath={l2Config?.logoPath}
71-
onClick={onL2WalletButtonClick}
72-
/>
73-
)}
7476
</div>
7577
</div>
7678
);

src/components/Containers/Header/Header.module.scss

+9-7
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,20 @@ $chain-color: $--color-white-1;
5555
.right {
5656
margin-left: 20px;
5757

58-
button {
59-
&:not(:last-child) {
60-
margin: 0 16px 0 0;
61-
}
58+
.tabs {
59+
display: flex;
60+
flex-direction: row;
61+
margin-right: 10px;
6262
}
6363

64-
.tabs {
64+
.walletButtons {
6565
display: flex;
66-
flex-flow: row nowrap;
66+
flex-direction: row;
6767

6868
button {
69-
margin: 0 12px 0 0;
69+
&:not(:last-child) {
70+
margin-right: 30px;
71+
}
7072
}
7173
}
7274
}

src/components/Features/Bridge/Bridge.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import {Account, FAQ, SelectToken, ToastProvider, Transfer} from '..';
3+
import {Account, Faq, SelectToken, ToastProvider, Transfer} from '..';
44
import {MenuType} from '../../../enums';
55
import {useMenu} from '../../../providers/MenuProvider';
66
import styles from './Bridge.module.scss';
@@ -17,7 +17,7 @@ export const Bridge = () => {
1717
case MenuType.ACCOUNT:
1818
return <Account {...menuProps[MenuType.ACCOUNT]} />;
1919
case MenuType.FAQ:
20-
return <FAQ />;
20+
return <Faq />;
2121
}
2222
};
2323

src/components/Features/FAQ/FAQ.js src/components/Features/Faq/Faq.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import React from 'react';
33
import {faqs} from '../../../config/faqs';
44
import {useMenu} from '../../../providers/MenuProvider';
55
import {BackButton, Menu, MenuTitle} from '../../UI';
6-
import styles from './FAQ.module.scss';
7-
import {TITLE_TXT} from './FAQ.strings';
6+
import styles from './Faq.module.scss';
7+
import {TITLE_TXT} from './Faq.strings';
88

9-
export const FAQ = () => {
9+
export const Faq = () => {
1010
const {showTransferMenu} = useMenu();
1111

1212
return (

src/components/Features/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export * from './Account/Account';
22
export * from './Bridge/Bridge';
33
export * from './Login/Login';
4-
export * from './FAQ/FAQ';
4+
export * from './Faq/Faq';
55
export * from './SelectToken/SelectToken';
66
export * from './Transfer/Transfer';
77
export * from './TransferLog/TransferLog';

src/components/UI/Tab/Tab.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
33

4+
import {toClasses} from '../../../utils/object';
45
import styles from './Tab.module.scss';
56

6-
export const Tab = ({label, onClick}) => {
7+
export const Tab = ({label, isLink, onClick}) => {
78
return (
8-
<button className={styles.tab} onClick={onClick}>
9+
<button className={toClasses(styles.tab, isLink && styles.link)} onClick={onClick}>
910
{label}
1011
</button>
1112
);
1213
};
1314
Tab.propTypes = {
1415
label: PropTypes.string,
16+
isLink: PropTypes.bool,
1517
onClick: PropTypes.func
1618
};

src/components/UI/Tab/Tab.module.scss

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
@import '../../../index';
22

33
$color: $--color-white;
4-
$active-color: $--color-beta;
4+
$color: $--color-white;
55

66
.tab {
7-
text-align: center;
87
text-transform: capitalize;
9-
font-weight: bold;
10-
font-size: 14px;
8+
font-weight: 500;
9+
font-size: 18px;
1110
line-height: 1.2;
12-
margin: 10px 0;
13-
padding: 20px 4px;
11+
margin-right: 30px;
1412
cursor: pointer;
1513
background-color: transparent;
1614
color: $color;
1715
text-decoration: none;
1816
box-sizing: border-box;
1917
border: none;
20-
border-radius: 7px;
21-
22-
&:hover {
23-
text-decoration: underline;
24-
}
18+
transition: 0.3s ease-in-out;
19+
font-family: $--primary-font;
2520

26-
&:active {
27-
color: $active-color;
28-
text-decoration-color: $active-color;
21+
&.link {
22+
&:hover {
23+
text-decoration: underline;
24+
}
2925
}
3026
}

src/index.scss

+49
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,62 @@
22
@import './styles/colors.module';
33
@import './styles/fonts.module';
44

5+
@font-face {
6+
font-family: 'Inter';
7+
font-weight: 100;
8+
font-style: normal;
9+
src: url('assets/fonts/Inter/Inter-Thin.ttf') format('truetype');
10+
}
11+
12+
@font-face {
13+
font-family: 'Inter';
14+
font-weight: 200;
15+
font-style: normal;
16+
src: url('assets/fonts/Inter/Inter-ExtraLight.ttf') format('truetype');
17+
}
18+
19+
@font-face {
20+
font-family: 'Inter';
21+
font-weight: 300;
22+
font-style: normal;
23+
src: url('assets/fonts/Inter/Inter-Light.ttf') format('truetype');
24+
}
25+
526
@font-face {
627
font-family: 'Inter';
728
font-weight: 400;
829
font-style: normal;
930
src: url('assets/fonts/Inter/Inter-Regular.ttf') format('truetype');
1031
}
1132

33+
@font-face {
34+
font-family: 'Inter';
35+
font-weight: 500;
36+
font-style: normal;
37+
src: url('assets/fonts/Inter/Inter-Medium.ttf') format('truetype');
38+
}
39+
40+
@font-face {
41+
font-family: 'Inter';
42+
font-weight: 600;
43+
font-style: normal;
44+
src: url('assets/fonts/Inter/Inter-SemiBold.ttf') format('truetype');
45+
}
46+
47+
@font-face {
48+
font-family: 'Inter';
49+
font-weight: 700;
50+
font-style: normal;
51+
src: url('assets/fonts/Inter/Inter-Bold.ttf') format('truetype');
52+
}
53+
54+
@font-face {
55+
font-family: 'Inter';
56+
font-weight: 800;
57+
font-style: normal;
58+
src: url('assets/fonts/Inter/Inter-ExtraBold.ttf') format('truetype');
59+
}
60+
1261
html,
1362
body {
1463
padding: 0;

0 commit comments

Comments
 (0)