Skip to content

Commit 3dda148

Browse files
committed
[style]keep컴포넌트
1 parent 232928c commit 3dda148

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
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 & 1 deletion
Loading

src/shared/assets/icons/keep_active_36.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import KeepIcon from '@/shared/assets/icons/keep_36.svg';
2+
import KeepIconActive from '@/shared/assets/icons/keep_active_36.svg';
3+
import { useState } from 'react';
4+
function Keep() {
5+
const [isClick, setIsClick] = useState(false);
6+
const handleClick = () => {
7+
setIsClick(!isClick);
8+
};
9+
10+
return (
11+
<button type="button" onClick={handleClick} aria-label="킵 버튼">
12+
{isClick ? (
13+
<KeepIcon fill="transparent" className="[&_*]:duration-100 hover:[&_*]:fill-secondary/50" />
14+
) : (
15+
<KeepIconActive
16+
fill="transparent"
17+
className="[&_*]:duration-100 hover:[&_*]:fill-secondary/50 "
18+
/>
19+
)}
20+
</button>
21+
);
22+
}
23+
export default Keep;

0 commit comments

Comments
 (0)