Skip to content

Commit 2665891

Browse files
authored
Merge pull request #50 from prgrms-web-devcourse-final-project/feat/share#8
Feat/공유하기 컴포넌트#8
2 parents 232928c + bd43352 commit 2665891

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

src/app/design-system/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import ChatInput from '@/shared/components/InputBox/ChatInput';
1111
import SelectBox from '@/shared/components/InputBox/SelectBox';
1212
import LikeBtn from '@/shared/components/like/LikeBtn';
1313
import Share from '@/shared/components/share/Share';
14+
import Keep from '@/shared/components/keep/Keep';
1415

1516
function Page() {
1617
const [isModalOpen, setModalOpen] = useState(false);
@@ -148,6 +149,10 @@ function Page() {
148149
<Share />
149150
<Share variants="community" />
150151
</div>
152+
<div className="space-y-2">
153+
<h3 className="text-lg font-medium border-b pb-1">keep</h3>
154+
<Keep />
155+
</div>
151156
</div>
152157
</div>
153158
);

src/shared/assets/icons/keep_36.svg

Lines changed: 1 addition & 2 deletions
Loading

src/shared/assets/icons/keep_active_36.svg

Lines changed: 1 addition & 2 deletions
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import KeepIcon from '@/shared/assets/icons/keep_36.svg';
2+
import KeepIconActive from '@/shared/assets/icons/keep_active_36.svg';
3+
4+
import { useState } from 'react';
5+
function Keep() {
6+
const [isClick, setIsClick] = useState(false);
7+
const handleClick = () => {
8+
setIsClick(!isClick);
9+
};
10+
11+
return (
12+
<button type="button" onClick={handleClick} aria-label="킵 버튼">
13+
{isClick ? (
14+
<KeepIcon
15+
fill="transparent"
16+
className="[filter:drop-shadow(0_0_8px_rgba(255,255,255,0.8))] [&_*]:duration-100 hover:[&_*]:fill-secondary/60"
17+
aria-hidden
18+
/>
19+
) : (
20+
<KeepIconActive
21+
fill="transparent"
22+
className="
23+
[filter:drop-shadow(0_0_8px_rgba(255,255,255,0.8))]
24+
[&_*]:duration-200
25+
&_g>g>path[stroke]]:stroke-black
26+
[&_g>path[fill='black']]:black
27+
hover:[&_g>g>path]:fill-secondary/60
28+
"
29+
aria-hidden
30+
/>
31+
)}
32+
</button>
33+
);
34+
}
35+
export default Keep;

0 commit comments

Comments
 (0)