8000 refactor: style ModeToggleBtn · codeisneverodd/home@ef45626 · GitHub
[go: up one dir, main page]

Skip to content

Commit ef45626

Browse files
refactor: style ModeToggleBtn
1 parent 83ade91 commit ef45626

File tree

14 files changed

+25
-17
lines changed

14 files changed

+25
-17
lines changed
File renamed without changes.

src/lib/components/MainLayout.tsx renamed to src/lib/@components/MainLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import useColor from "@/lib/hooks/useColor";
1+
import useColor from "@/lib/@hooks/useColor";
22
import {
33
Box,
44
Button,
File renamed without changes.
File renamed without changes.

src/lib/solution-pass/components/DropdownSearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import useColor from "@/lib/hooks/useColor";
1+
import useColor from "@/lib/@hooks/useColor";
22
import { Box, Center, Flex, Text, useOutsideClick } from "@chakra-ui/react";
33
import { ComponentProps, useRef, useState } from "react";
44
import AutoSizer from "react-virtualized-auto-sizer";

src/lib/solution-pass/components/ModeToggleBtn.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import useColor from "@/lib/@hooks/useColor";
12
import { Button, Icon, IconButton } from "@chakra-ui/react";
23
import { faPencil, faSearch } from "@fortawesome/free-solid-svg-icons";
34
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -20,6 +21,7 @@ const modeIcon: {
2021
};
2122

2223
export default function ModeToggleBtn({ mode, ...props }: ModeToggleBtnProps) {
24+
const { accentBg, subtleBg } = useColor();
2325
return (
2426
<Button
2527
rounded="full"
@@ -28,8 +30,14 @@ export default function ModeToggleBtn({ mode, ...props }: ModeToggleBtnProps) {
2830
right="40px"
2931
size="lg"
3032
variant="solid"
31-
backdropFilter="auto"
32-
backdropBlur="3xl"
33+
shadow="lg"
34+
_dark={{
35+
bg: accentBg,
36+
_hover: {
37+
bg: subtleBg
38+
}
39+
}}
40+
_
3341
leftIcon={<Icon as={FontAwesomeIcon} icon={modeIcon[mode]. 6D40 icon} />}
3442
{...props}
3543
>

src/lib/solution-pass/components/ResultSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import useColor from "@/lib/hooks/useColor";
1+
import useColor from "@/lib/@hooks/useColor";
22
import { CustomAppProps } from "@/pages/_app";
33
import {
44
Accordion,
@@ -59,7 +59,7 @@ function TableHeader() {
5959
>
6060
<Text w="60px">난이도</Text>
6161
<Text flex="1">제목</Text>
62-
<Text w="60px">풀이</Text>
62+
<Text w="60px">정답</Text>
6363
<Text w="40px">정답</Text>
6464
</Flex>
6565
);

src/lib/solution-pass/components/SolutionSubmitForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import useColor from "@/lib/hooks/useColor";
1+
import useColor from "@/lib/@hooks/useColor";
22
import {
33
Avatar,
44
Button,
@@ -152,7 +152,7 @@ function SubmitToolBar() {
152152

153153
createIssueMutation.mutate(
154154
{
155-
title: `Level ${selectedProb?.level} | ${selectedProb?.title} 풀이 | | ${session.user?.name}`,
155+
title: `Level ${selectedProb?.level} | ${selectedProb?.title} 정답 | | ${session.user?.name}`,
156156
code,
157157
assignees: [session.user?.name ?? "", "codeisneverodd"]
158158
},

src/lib/solution-pass/hooks/useSearch.ts

Expand all lines: src/lib/solution-pass/hooks/useSearch.ts
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { localStorageEffect } from "@/lib/utils/storageEffect";
1+
import { localStorageEffect } from "@/lib/@utils/storageEffect";
22
import { QueryStatus } from "@tanstack/react-query";
33
import { chosungIncludes, hangulIncludes } from "@toss/hangul";
44
import { atom, useRecoilState, useResetRecoilState } from "recoil";

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import MainLayout from "@/lib/components/MainLayout";
1+
import MainLayout from "@/lib/@components/MainLayout";
22
import { Center, Text } from "@chakra-ui/react";
33

44
export default function Home() {

src/pages/solution-pass/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import MainLayout from "@/lib/components/MainLayout";
1+
import MainLayout from "@/lib/@components/MainLayout";
22
import ModeToggleBtn from "@/lib/solution-pass/components/ModeToggleBtn";
33
import ResultSection from "@/lib/solution-pass/components/ResultSection";
44
import SearhBar from "@/lib/solution-pass/components/SearchBar";
@@ -7,7 +7,7 @@ import { Link } from "@chakra-ui/react";
77

88
export default function SolutionPass() {
99
return (
10-
<MainLayout title="새로운 풀이">
10+
<MainLayout title="Solution Pass">
1111
<SolutionPassLayout>
1212
<SearhBar />
1313
<ResultSection />

src/pages/solution-pass/new/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import MainLayout from "@/lib/components/MainLayout";
2-
import useClient from "@/lib/hooks/useClient";
1+
import MainLayout from "@/lib/@components/MainLayout";
2+
import useClient from "@/lib/@hooks/useClient";
33
import DropdownSearhBar from "@/lib/solution-pass/components/DropdownSearchBar";
44
import ModeToggleBtn from "@/lib/solution-pass/components/ModeToggleBtn";
55
import SolutionPassLayout from "@/lib/solution-pass/components/SolutionPassLayout";
@@ -12,12 +12,12 @@ export default function NewSolution() {
1212
if (!isClient) return null;
1313

1414
return (
15-
<MainLayout title="Solution Pass">
15+
<MainLayout title="새로운 정답">
1616
<SolutionPassLayout>
1717
<DropdownSearhBar />
1818
<SolutionSubmitForm />
1919
<Link href="/solution-pass">
20-
<ModeToggleBtn mode="search" aria-label="풀이 검색하기" />
20+
<ModeToggleBtn mode="search" aria-label="정답 검색하기" />
2121
</Link>
2222
</SolutionPassLayout>
2323
</MainLayout>

src/pages/solution-pass/new/submitted/[issueNum].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import MainLayout from "@/lib/components/MainLayout";
1+
import MainLayout from "@/lib/@components/MainLayout";
22
import SolutionPassLayout from "@/lib/solution-pass/components/SolutionPassLayout";
33
import {
44
Accordion,

0 commit comments

Comments
 (0)
0