Skip to content

Commit

Permalink
Fix tree nesting (#226)
Browse files Browse the repository at this point in the history
* Remove p tag from TreeItem for proper HTML

* Semver
  • Loading branch information
natoverse committed Feb 2, 2024
1 parent 3a0efd0 commit 42083c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .yarn/versions/e9ee5d80.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
releases:
"@essex/components": patch
essex-toolkit-stories: patch
4 changes: 2 additions & 2 deletions packages/components/src/Tree/TreeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const TreeItem: React.FC<TreeItemProps> = memo(function TreeItem(props) {
style={_styles.listItem}
key={`tree-item-li-${item.key}`}
>
<p
<div
style={listItemContentStyles}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
Expand All @@ -81,7 +81,7 @@ export const TreeItem: React.FC<TreeItemProps> = memo(function TreeItem(props) {
{renderTitle(props)}
{item.menuItems && <IconButton {..._menuButtonProps} />}
</div>
</p>
</div>
{(item.expanded || narrow) && (
<ul style={_styles.list}>{contentRenderer(props)}</ul>
)}
Expand Down

0 comments on commit 42083c0

Please sign in to comment.