From 9cc11aa0e815fa262d05d31151c0459a79a42fd5 Mon Sep 17 00:00:00 2001 From: DaeHyun_Woo Date: Thu, 19 Oct 2023 00:18:46 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=EB=82=B4=EA=B0=80=20=EA=B0=80?= =?UTF-8?q?=EC=9E=85=ED=95=9C=20=EB=AA=A8=EC=9E=84=20simple=20ui=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stories/bookgroup/SimpleGroup.stories.tsx | 34 +++++++++++++++ src/v1/bookgroup/SimpleGroup.tsx | 41 +++++++++++++++++++ tailwind.config.js | 4 ++ 3 files changed, 79 insertions(+) create mode 100644 src/stories/bookgroup/SimpleGroup.stories.tsx create mode 100644 src/v1/bookgroup/SimpleGroup.tsx diff --git a/src/stories/bookgroup/SimpleGroup.stories.tsx b/src/stories/bookgroup/SimpleGroup.stories.tsx new file mode 100644 index 00000000..2fca07d1 --- /dev/null +++ b/src/stories/bookgroup/SimpleGroup.stories.tsx @@ -0,0 +1,34 @@ +import { Meta, StoryObj } from '@storybook/react'; +import SimpleGroup from '@/v1/bookgroup/SimpleGroup'; + +const meta: Meta = { + title: 'Base/SimpleGroup', + component: SimpleGroup, + tags: ['autodocs'], +}; + +export default meta; + +type Story = StoryObj; + +const moveGroupDetail = () => { + alert('모임 상세 페이지로 이동'); +}; + +export const Default: Story = { + args: { + title: '데일카네기 인간관계론', + imageSource: 'https://image.yes24.com/goods/79297023/XL', + isOwner: false, + eventHandler: moveGroupDetail, + }, +}; + +export const OwnerCase: Story = { + args: { + title: '데일카네기 인간관계론', + imageSource: 'https://image.yes24.com/goods/79297023/XL', + isOwner: true, + eventHandler: moveGroupDetail, + }, +}; diff --git a/src/v1/bookgroup/SimpleGroup.tsx b/src/v1/bookgroup/SimpleGroup.tsx new file mode 100644 index 00000000..4d973b58 --- /dev/null +++ b/src/v1/bookgroup/SimpleGroup.tsx @@ -0,0 +1,41 @@ +import Image from 'next/image'; + +interface SimpleGroupProps { + title: string; + isOwner: boolean; + imageSource: string; + eventHandler: () => void; +} + +const SimpleGroup = ({ + title, + isOwner, + eventHandler, + imageSource, +}: SimpleGroupProps) => { + return ( +
+
+
+ bookgroup +
+
+
+

+ {isOwner ? `👑 ${title}` : title} +

+
+
+ ); +}; + +export default SimpleGroup; diff --git a/tailwind.config.js b/tailwind.config.js index 7ae38948..362e4f44 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -7,6 +7,7 @@ module.exports = { './src/app/**/*.{ts,tsx}', './src/stories/**/*.{ts,tsx}', './.storybook/**/*.{ts,tsx}', + './src/v1/**/*.{ts,tsx}', ], theme: { extend: { @@ -51,6 +52,9 @@ module.exports = { 800: '#191600', 900: '#000000', }, + orange: { + 100: '#F5F4EE', + }, white: '#FFFFFF', background: '#FCFCFC', cancel: '#CFCFCF', From 013854aa84e565566ca770ef7fc1833613e4a548 Mon Sep 17 00:00:00 2001 From: DaeHyun_Woo Date: Thu, 19 Oct 2023 23:55:56 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=EC=9A=94?= =?UTF-8?q?=EC=86=8C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stories/bookgroup/SimpleGroup.stories.tsx | 6 ++--- src/v1/bookgroup/SimpleGroup.tsx | 24 +++++++++---------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/stories/bookgroup/SimpleGroup.stories.tsx b/src/stories/bookgroup/SimpleGroup.stories.tsx index 2fca07d1..0e36f0bd 100644 --- a/src/stories/bookgroup/SimpleGroup.stories.tsx +++ b/src/stories/bookgroup/SimpleGroup.stories.tsx @@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react'; import SimpleGroup from '@/v1/bookgroup/SimpleGroup'; const meta: Meta = { - title: 'Base/SimpleGroup', + title: 'BookGroup/SimpleGroup', component: SimpleGroup, tags: ['autodocs'], }; @@ -20,7 +20,7 @@ export const Default: Story = { title: '데일카네기 인간관계론', imageSource: 'https://image.yes24.com/goods/79297023/XL', isOwner: false, - eventHandler: moveGroupDetail, + handleClick: moveGroupDetail, }, }; @@ -29,6 +29,6 @@ export const OwnerCase: Story = { title: '데일카네기 인간관계론', imageSource: 'https://image.yes24.com/goods/79297023/XL', isOwner: true, - eventHandler: moveGroupDetail, + handleClick: moveGroupDetail, }, }; diff --git a/src/v1/bookgroup/SimpleGroup.tsx b/src/v1/bookgroup/SimpleGroup.tsx index 4d973b58..154fac4a 100644 --- a/src/v1/bookgroup/SimpleGroup.tsx +++ b/src/v1/bookgroup/SimpleGroup.tsx @@ -4,30 +4,28 @@ interface SimpleGroupProps { title: string; isOwner: boolean; imageSource: string; - eventHandler: () => void; + handleClick: () => void; } const SimpleGroup = ({ title, isOwner, - eventHandler, + handleClick, imageSource, }: SimpleGroupProps) => { return (
-
-
- bookgroup -
+
+ bookgroup

From 856454c061604c536c737350a15286a6278b955d Mon Sep 17 00:00:00 2001 From: DaeHyun_Woo Date: Sat, 4 Nov 2023 18:21:05 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= =?UTF-8?q?=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...oup.stories.tsx => SimpleBookGroupCard.stories.tsx} | 10 +++++----- .../{SimpleGroup.tsx => SimpleBookGroupCard.tsx} | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) rename src/stories/bookgroup/{SimpleGroup.stories.tsx => SimpleBookGroupCard.stories.tsx} (71%) rename src/v1/bookgroup/{SimpleGroup.tsx => SimpleBookGroupCard.tsx} (84%) diff --git a/src/stories/bookgroup/SimpleGroup.stories.tsx b/src/stories/bookgroup/SimpleBookGroupCard.stories.tsx similarity index 71% rename from src/stories/bookgroup/SimpleGroup.stories.tsx rename to src/stories/bookgroup/SimpleBookGroupCard.stories.tsx index 0e36f0bd..19955863 100644 --- a/src/stories/bookgroup/SimpleGroup.stories.tsx +++ b/src/stories/bookgroup/SimpleBookGroupCard.stories.tsx @@ -1,15 +1,15 @@ import { Meta, StoryObj } from '@storybook/react'; -import SimpleGroup from '@/v1/bookgroup/SimpleGroup'; +import SimpleBookGroupCard from '@/v1/bookgroup/SimpleBookGroupCard'; -const meta: Meta = { - title: 'BookGroup/SimpleGroup', - component: SimpleGroup, +const meta: Meta = { + title: 'BookGroup/SimpleBookGroupCard', + component: SimpleBookGroupCard, tags: ['autodocs'], }; export default meta; -type Story = StoryObj; +type Story = StoryObj; const moveGroupDetail = () => { alert('모임 상세 페이지로 이동'); diff --git a/src/v1/bookgroup/SimpleGroup.tsx b/src/v1/bookgroup/SimpleBookGroupCard.tsx similarity index 84% rename from src/v1/bookgroup/SimpleGroup.tsx rename to src/v1/bookgroup/SimpleBookGroupCard.tsx index 154fac4a..e75f2405 100644 --- a/src/v1/bookgroup/SimpleGroup.tsx +++ b/src/v1/bookgroup/SimpleBookGroupCard.tsx @@ -1,18 +1,18 @@ import Image from 'next/image'; -interface SimpleGroupProps { +interface SimpleBookGroupCardProps { title: string; isOwner: boolean; imageSource: string; handleClick: () => void; } -const SimpleGroup = ({ +const SimpleBookGroupCard = ({ title, isOwner, handleClick, imageSource, -}: SimpleGroupProps) => { +}: SimpleBookGroupCardProps) => { return (

Date: Sun, 5 Nov 2023 21:28:45 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=95=B8=EB=93=A4=EB=9F=AC=20=EB=AA=85=EC=B9=AD=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stories/bookgroup/SimpleBookGroupCard.stories.tsx | 6 +++--- src/v1/bookgroup/SimpleBookGroupCard.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stories/bookgroup/SimpleBookGroupCard.stories.tsx b/src/stories/bookgroup/SimpleBookGroupCard.stories.tsx index 19955863..a7d1603b 100644 --- a/src/stories/bookgroup/SimpleBookGroupCard.stories.tsx +++ b/src/stories/bookgroup/SimpleBookGroupCard.stories.tsx @@ -11,7 +11,7 @@ export default meta; type Story = StoryObj; -const moveGroupDetail = () => { +const handleClick = () => { alert('모임 상세 페이지로 이동'); }; @@ -20,7 +20,7 @@ export const Default: Story = { title: '데일카네기 인간관계론', imageSource: 'https://image.yes24.com/goods/79297023/XL', isOwner: false, - handleClick: moveGroupDetail, + onClick: handleClick, }, }; @@ -29,6 +29,6 @@ export const OwnerCase: Story = { title: '데일카네기 인간관계론', imageSource: 'https://image.yes24.com/goods/79297023/XL', isOwner: true, - handleClick: moveGroupDetail, + onClick: handleClick, }, }; diff --git a/src/v1/bookgroup/SimpleBookGroupCard.tsx b/src/v1/bookgroup/SimpleBookGroupCard.tsx index e75f2405..4e535a14 100644 --- a/src/v1/bookgroup/SimpleBookGroupCard.tsx +++ b/src/v1/bookgroup/SimpleBookGroupCard.tsx @@ -4,19 +4,19 @@ interface SimpleBookGroupCardProps { title: string; isOwner: boolean; imageSource: string; - handleClick: () => void; + onClick: () => void; } const SimpleBookGroupCard = ({ title, isOwner, - handleClick, + onClick, imageSource, }: SimpleBookGroupCardProps) => { return (