Skip to content

Commit 55d2dfe

Browse files
committed
make icons on mobile bigger
1 parent 97a6da2 commit 55d2dfe

File tree

6 files changed

+36
-14
lines changed

6 files changed

+36
-14
lines changed

src/components/ColorModeToggler/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export default function ColorModeToggle({className = ''}) {
1616
return (
1717
<button className={`${styles.colorModeButton} ${className}`} onClick={updateColor}>
1818
{colorMode === 'dark' ? (
19-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="20" height="20" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6" strokeLinecap="round" strokeLinejoin="round">
19+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="31" height="31" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6" strokeLinecap="round" strokeLinejoin="round">
2020
<path strokeLinecap="round" strokeLinejoin="round" d="M18.3945 13.0269C18.7245 12.8719 19.0765 13.1969 18.9845 13.5499C18.6705 14.7519 18.0535 15.8959 17.1035 16.8459C14.2825 19.6669 9.76953 19.7259 7.02153 16.9779C4.27353 14.2299 4.33353 9.71589 7.15453 6.89489C8.10453 5.94489 9.24753 5.32789 10.4505 5.01389C10.8035 4.92189 11.1275 5.27389 10.9735 5.60389C9.97153 7.74289 10.3005 10.3049 11.9975 12.0019C13.6935 13.6999 16.2555 14.0289 18.3945 13.0269V13.0269Z" />
2121
</svg>
2222
) : (
23-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="20" height="20" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6" strokeLinecap="round" strokeLinejoin="round">
23+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="31" height="31" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6" strokeLinecap="round" strokeLinejoin="round">
2424
<path strokeLinecap="round" strokeLinejoin="round" d="M12 2v2M12 20v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M2 12h2M20 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" />
2525
<circle cx="12" cy="12" r="5" strokeLinecap="round" strokeLinejoin="round" />
2626
</svg>

src/components/ColorModeToggler/styles.module.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
align-items: center;
66
cursor: pointer;
77
border: 1px solid rgba(0, 0, 0, 0.1);
8-
padding: 0.438rem;
8+
padding: 1px;
99
gap: 8px;
1010
color: var(--click-color-secondary-button-text);
1111
border: 0;
1212
border-radius: 4px;
1313
background: transparent;
1414
}
15+
1516
.colorModeButton:hover {
1617
background: var(--ifm-menu-color-background-active);
1718
}
@@ -21,5 +22,19 @@
2122
white-space: nowrap;
2223
}
2324

25+
@media (min-width: breakpoints.$laptop-breakpoint) {
26+
[data-theme="light"] .colorModeButton {
27+
color: rgb(100, 100, 100);
28+
}
29+
30+
.colorModeButton {
31+
width: 28px;
32+
height: 28px;
33+
}
34+
35+
.colorModeButton:hover {
36+
background-color: unset;
37+
}
38+
}
2439

2540

src/components/MobileSideBarMenu/Content.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ const MobileSideBarMenuContents = ({ className, onClick, onClose, sidebar, path,
252252
<div className={styles.headerActions}>
253253
<MobileLanguagePicker onLanguageChange={handleLanguageChange} />
254254
<ColorModeToggle/>
255-
<div className={styles.iconClose}><IconClose width={12} height={12} onClick={onClose || onClick} /></div>
255+
<div className={styles.iconClose} onClick={onClose || onClick}>
256+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="31" height="31" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6" strokeLinecap="round" strokeLinejoin="round">
257+
<path strokeLinecap="round" strokeLinejoin="round" d="M6 6L18 18M6 18L18 6" />
258+
</svg>
259+
</div>
256260
</div>
257261
</div>
258262
<div className={styles.bottomLevel}>

src/components/MobileSideBarMenu/MobileLanguagePicker.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ const MobileLanguagePicker = ({ onLanguageChange }) => {
114114
aria-expanded={isOpen}
115115
aria-haspopup="true"
116116
>
117-
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" className={styles.globeIcon}>
117+
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" className={styles.globeIcon}>
118118
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/>
119119
</svg>
120120
<span className={styles.languageText}>{currentLocaleLabel}</span>
121121
<svg
122-
width="12"
123-
height="12"
124-
viewBox="0 0 24 24"
122+
width="31"
123+
height="31"
124+
viewBox="0 0 31 31"
125125
fill="currentColor"
126126
className={`${styles.chevronIcon} ${isOpen ? styles.chevronOpen : ''}`}
127127
>

src/components/MobileSideBarMenu/mobileLanguagePicker.module.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
position: relative;
44
display: flex;
55
align-items: center;
6+
height: 32px;
67
}
78

89
.languageButton {
910
display: flex;
1011
align-items: center;
1112
gap: 0.375rem;
12-
padding: 0.5rem;
13+
padding: 3px;
1314
border: none;
1415
background: transparent;
1516
color: var(--ifm-font-color-base);
@@ -30,8 +31,8 @@
3031
}
3132

3233
.globeIcon {
33-
width: 16px;
34-
height: 16px;
34+
width: 26px;
35+
height: 26px;
3536
flex-shrink: 0;
3637
opacity: 0.8;
3738
}
@@ -41,11 +42,12 @@
4142
text-align: center;
4243
font-weight: 600;
4344
letter-spacing: 0.025em;
45+
font-size: 16px;
4446
}
4547

4648
.chevronIcon {
47-
width: 12px;
48-
height: 12px;
49+
width: 20px;
50+
height: 20px;
4951
flex-shrink: 0;
5052
opacity: 0.6;
5153
transition: transform 0.2s ease;

src/components/MobileSideBarMenu/styles.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@
234234
}
235235

236236
.iconClose {
237-
padding: 0.3rem 0.5rem !important;
237+
padding: 1px;
238238
border-radius: 6px;
239+
display: flex;
239240
}
240241

241242
.iconClose:hover {

0 commit comments

Comments
 (0)