Skip to content

Commit

Permalink
fix: 비활성화 탭에 해당 하는 컨텐츠가 빈 div를 반환하지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
dmswl98 committed Dec 28, 2023
1 parent 10f91eb commit ee188e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/components/Tabs/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ export const Basic: Story = {
<Tabs.Trigger value="끄적이는">끄적이는</Tabs.Trigger>
<Tabs.Trigger value="참고하는">참고하는</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="끄적이는">끄적이는 내용</Tabs.Content>
<Tabs.Content value="참고하는">참고하는 내용</Tabs.Content>
<Tabs.Content value="끄적이는">
<div>끄적이는 내용</div>
</Tabs.Content>
<Tabs.Content value="참고하는">
<div>참고하는 내용</div>
</Tabs.Content>
</Tabs>
),
};
2 changes: 1 addition & 1 deletion src/components/Tabs/TabsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const TabsContent = ({
}: PropsWithChildren<TabsContentProps>) => {
const { selectedTab } = useTabsContext();

return <div>{selectedTab === value ? children : null}</div>;
return <>{selectedTab === value ? children : null}</>;
};

export default TabsContent;

0 comments on commit ee188e3

Please sign in to comment.