Skip to content

Commit

Permalink
fix: remove nested li tag
Browse files Browse the repository at this point in the history
  • Loading branch information
syoung125 committed May 23, 2024
1 parent 0bb0f97 commit 7ef132f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export default function FileTreeItem({

if (!children) {
return (
<Li isSelected={isSelected} onClick={onClick} isFile>
<TitleWrapper isSelected={isSelected} onClick={onClick} isFile>
<Title>📝 {title}</Title>
</Li>
</TitleWrapper>
);
}

Expand All @@ -37,10 +37,10 @@ export default function FileTreeItem({
: ChevronRightIcon;
return (
<Wrapper>
<Li onClick={toggleExpand}>
<TitleWrapper onClick={toggleExpand}>
<ChevronIcon style={{ width: "1rem", height: "1rem" }} />
<Title>📂 {title}</Title>
</Li>
</TitleWrapper>
{isExpanded && <Ul>{children}</Ul>}
</Wrapper>
);
Expand All @@ -51,7 +51,7 @@ const Wrapper = styled.li`
flex-direction: column;
`;

const Li = styled.li<{ isSelected?: boolean; isFile?: boolean }>`
const TitleWrapper = styled.div<{ isSelected?: boolean; isFile?: boolean }>`
display: flex;
align-items: center;
Expand Down

0 comments on commit 7ef132f

Please sign in to comment.