Skip to content

Commit

Permalink
Formatting: #62 ListSidebar props 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-bear98 committed Aug 8, 2024
1 parent 6d3c1d4 commit d9a67ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/components/sidebar/ListSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ type ListSidebarProps = {
label?: string;
title: string;
children?: ReactNode;
isButton?: boolean;
buttonText?: string;
onButtonClick?: () => void;
showButton?: boolean;
text?: string;
onClick?: () => void;
};

// ToDo: 프로젝트 생성 등과 같은 버튼 기능 추가할 것
export default function ListSidebar({ label, title, children, isButton, buttonText, onButtonClick }: ListSidebarProps) {
export default function ListSidebar({ label, title, children, showButton, text, onClick }: ListSidebarProps) {
return (
<aside className="mr-10 flex w-1/3 flex-col border border-list bg-contents-box">
<div className="flex min-h-30 items-center justify-between bg-sub px-10">
Expand All @@ -19,13 +19,13 @@ export default function ListSidebar({ label, title, children, isButton, buttonTe
<span className="text-emphasis">{title}</span>
</div>
{/* 팀 생성 모달 */}
{isButton && (
{showButton && (
<button
type="button"
className="rounded-md bg-main px-4 py-2 text-white outline-none hover:brightness-90"
onClick={onButtonClick}
onClick={onClick}
>
{buttonText}
{text}
</button>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/page/TeamLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function TeamLayout() {
return (
<>
<section className="flex h-full p-15">
<ListSidebar title="팀 목록" isButton buttonText="팀 생성" onButtonClick={openTeamModal}>
<ListSidebar title="팀 목록" showButton text="팀 생성" onClick={openTeamModal}>
{/* ToDo: 사이드바 팀정보 추가 예정 */}
<div />
</ListSidebar>
Expand Down

0 comments on commit d9a67ed

Please sign in to comment.