Skip to content

Commit 7927616

Browse files
committed
Added a lamp
1 parent f604fe2 commit 7927616

File tree

8 files changed

+164
-0
lines changed

8 files changed

+164
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
type IconProps = {
2+
className?: string;
3+
overrideDefaultClassName?: boolean;
4+
};
5+
6+
// Lucide
7+
export const GraduationCapIcon = (props: IconProps) => {
8+
const { className, overrideDefaultClassName } = props;
9+
return (
10+
<svg
11+
xmlns="http://www.w3.org/2000/svg"
12+
fill="none"
13+
viewBox="0 0 24 24"
14+
strokeWidth={1.5}
15+
stroke="currentColor"
16+
stroke-linejoin="round"
17+
className={
18+
overrideDefaultClassName ? className : `size-5 ${className}`
19+
}
20+
role="presentation"
21+
>
22+
<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z"/>
23+
<path d="M22 10v6"/>
24+
<path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5"/>
25+
</svg>
26+
);
27+
};

src/assets/icons/HomeIcon.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
type IconProps = {
2+
className?: string;
3+
overrideDefaultClassName?: boolean;
4+
};
5+
6+
// Lucide
7+
export const HomeIcon = (props: IconProps) => {
8+
const { className, overrideDefaultClassName } = props;
9+
return (
10+
<svg
11+
xmlns="http://www.w3.org/2000/svg"
12+
fill="none"
13+
viewBox="0 0 24 24"
14+
strokeWidth={1.5}
15+
stroke="currentColor"
16+
stroke-linejoin="round"
17+
className={
18+
overrideDefaultClassName ? className : `size-5 ${className}`
19+
}
20+
role="presentation"
21+
>
22+
<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/>
23+
<path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
24+
</svg>
25+
);
26+
};

src/assets/icons/LampIcon.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
type IconProps = {
2+
className?: string;
3+
overrideDefaultClassName?: boolean;
4+
};
5+
6+
// Lucide
7+
export const LampIcon = (props: IconProps) => {
8+
const { className, overrideDefaultClassName } = props;
9+
return (
10+
<svg
11+
xmlns="http://www.w3.org/2000/svg"
12+
fill="none"
13+
viewBox="0 0 24 24"
14+
strokeWidth={1.5}
15+
stroke="currentColor"
16+
className={
17+
overrideDefaultClassName ? className : `size-5 ${className}`
18+
}
19+
role="presentation"
20+
>
21+
<path d="M8 2h8l4 10H4L8 2Z"/>
22+
<path d="M12 12v6"/>
23+
<path d="M8 22v-2c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v2H8Z"/>
24+
</svg>
25+
);
26+
};

src/assets/icons/LampWallUpIcon.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
type IconProps = {
2+
className?: string;
3+
overrideDefaultClassName?: boolean;
4+
};
5+
6+
// Lucide
7+
export const LampWallUpIcon = (props: IconProps) => {
8+
const { className, overrideDefaultClassName } = props;
9+
return (
10+
<svg
11+
xmlns="http://www.w3.org/2000/svg"
12+
fill="none"
13+
viewBox="0 0 24 24"
14+
strokeWidth={1.5}
15+
stroke="currentColor"
16+
className={
17+
overrideDefaultClassName ? className : `size-5 ${className}`
18+
}
19+
role="presentation"
20+
>
21+
<path d="M11 4h6l3 7H8l3-7Z"/>
22+
<path d="M14 11v5a2 2 0 0 1-2 2H8"/>
23+
<path d="M4 15h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4v-6Z"/>
24+
</svg>
25+
);
26+
};

src/assets/icons/ListTodoIcon.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
type IconProps = {
2+
className?: string;
3+
overrideDefaultClassName?: boolean;
4+
};
5+
6+
// Lucide
7+
export const ListTodoIcon = (props: IconProps) => {
8+
const { className, overrideDefaultClassName } = props;
9+
return (
10+
<svg
11+
xmlns="http://www.w3.org/2000/svg"
12+
fill="none"
13+
viewBox="0 0 24 24"
14+
strokeWidth={1.5}
15+
stroke="currentColor"
16+
stroke-linejoin="round"
17+
className={
18+
overrideDefaultClassName ? className : `size-5 ${className}`
19+
}
20+
role="presentation"
21+
>
22+
<rect x="3" y="5" width="6" height="6" rx="1"/>
23+
<path d="m3 17 2 2 4-4"/>
24+
<path d="M13 6h8"/>
25+
<path d="M13 12h8"/>
26+
<path d="M13 18h8"/>
27+
</svg>
28+
);
29+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.light {
2+
background: conic-gradient(transparent 110deg, hsl(50 100% 80%), transparent 250deg);
3+
width: 600px;
4+
height: 500px;
5+
position: absolute;
6+
filter: blur(25px);
7+
z-index: -1;
8+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { LampWallUpIcon } from "@/assets/icons/LampWallUpIcon"
2+
import { useState } from "react"
3+
import styles from './LampWallUp.module.css'
4+
5+
export const LampWallUp = () => {
6+
const [isOn, setIsOn] = useState(false)
7+
8+
return (
9+
<button
10+
type="button"
11+
className={`opacity-0 hover:opacity-100 transition-all size-8 flex place-content-center place-items-center ${isOn ? 'opacity-100' : ''}`}
12+
onClick={() => setIsOn(!isOn)}
13+
>
14+
<LampWallUpIcon />
15+
<div
16+
className={`${isOn ? 'block' : 'hidden'} ${styles.light}`}
17+
/>
18+
</button>
19+
)
20+
}

src/container/MainMenu/MainMenu.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import logo from "@/assets/images/logo.png";
22
import { Settings } from "../Settings/Settings";
33
import { PipInput } from "../PipInput/PipInput";
44
import { TagEditor } from "../TagEditor/TagEditor";
5+
import { LampWallUp } from "@/common/components/lamps/LampWallUp/LampWallUp";
56

67
export const MainMenu = () => {
78
return (
@@ -14,6 +15,7 @@ export const MainMenu = () => {
1415
<PipInput />
1516
<TagEditor />
1617
<Settings />
18+
<LampWallUp />
1719
</div>
1820
);
1921
};

0 commit comments

Comments
 (0)