Skip to content

Commit

Permalink
FE-48 ๐Ÿ“ ์ปดํฌ๋„ŒํŠธ ์ด๋ฆ„ ๋ณ€๊ฒฝ
Browse files Browse the repository at this point in the history
๋ช…ํ™•ํ•œ ์˜๋ฏธ ์ „๋‹ฌ์„ ์œ„ํ•ด ์ปดํฌ๋„ŒํŠธ ์ด๋ฆ„ ๋ณ€๊ฒฝ
  • Loading branch information
newjinlee committed Jul 10, 2024
1 parent 830601e commit 991b355
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState } from 'react';
import { EmotionIconCard, EmotionIconCardProps } from '@/components/Emotion/card/EmotionIconCard';

// EmotionIconCardContainerProps ์ธํ„ฐํŽ˜์ด์Šค ์ •์˜
interface EmotionIconCardContainerProps extends Omit<EmotionIconCardProps, 'state'> {}
// InteractiveEmotionIconCardProps ์ธํ„ฐํŽ˜์ด์Šค ์ •์˜
interface InteractiveEmotionIconCardProps extends Omit<EmotionIconCardProps, 'state'> {}

// EmotionIconCardContainer ์ปดํฌ๋„ŒํŠธ ํ•จ์ˆ˜ ์„ ์–ธ
function EmotionIconCardContainer(props: EmotionIconCardContainerProps) {
// InteractiveEmotionIconCard ์ปดํฌ๋„ŒํŠธ ํ•จ์ˆ˜ ์„ ์–ธ
function InteractiveEmotionIconCard(props: InteractiveEmotionIconCardProps) {
const [state, setState] = useState<'Default' | 'Unclicked' | 'Clicked'>('Unclicked');

const handleClick = () => {
Expand All @@ -15,6 +15,6 @@ function EmotionIconCardContainer(props: EmotionIconCardContainerProps) {
return <EmotionIconCard {...props} state={state} onClick={handleClick} />;
}

EmotionIconCardContainer.displayName = 'EmotionIconCardContainer';
InteractiveEmotionIconCard.displayName = 'InteractiveEmotionIconCard';

export default EmotionIconCardContainer;
export default InteractiveEmotionIconCard;
2 changes: 1 addition & 1 deletion src/components/Emotion/card/TestComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import EmotionIconCardContainer from '@/components/Emotion/card/EmotionIconCardContainer';
import EmotionIconCardContainer from '@/components/Emotion/card/InteractiveEmotionIconCard';

function ExampleComponent() {
return (
Expand Down

0 comments on commit 991b355

Please sign in to comment.