Skip to content

Commit e653185

Browse files
committed
feat: integrate ThemeToggle into sidebar with proper positioning
1 parent fb031ae commit e653185

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

client/components/Sidebar.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
@value toggleTime: 200ms;
22

33
.container {
4-
background: #fff;
4+
background: var(--bg-primary);
55
border: none;
6-
border-right: 1px solid #aaa;
6+
border-right: 1px solid var(--border-color);
77
box-sizing: border-box;
88
max-width: calc(50% - 10px);
99
opacity: 0.95;
1010
z-index: 1;
11+
transition: background-color 0.3s ease, border-color 0.3s ease;
1112
}
1213

1314
.container:not(.hidden) {
@@ -45,6 +46,16 @@
4546
padding: 0;
4647
}
4748

49+
.container :global(.themeToggle) {
50+
position: absolute;
51+
top: 10px;
52+
left: 15px;
53+
z-index: 10;
54+
height: 26px;
55+
width: 27px;
56+
padding: 0;
57+
}
58+
4859
.pinButton,
4960
.toggleButton {
5061
cursor: pointer;

client/components/Sidebar.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import cls from 'classnames';
44
import s from './Sidebar.css';
55
import Button from './Button';
66
import Icon from './Icon';
7+
import ThemeToggle from './ThemeToggle';
78

89
const toggleTime = parseInt(s.toggleTime);
910

@@ -48,6 +49,7 @@ export default class Sidebar extends Component {
4849
className={className}
4950
onClick={this.handleClick}
5051
onMouseLeave={this.handleMouseLeave}>
52+
<ThemeToggle/>
5153
{visible &&
5254
<Button type="button"
5355
title="Pin"

0 commit comments

Comments
 (0)