Skip to content

Commit 4589d04

Browse files
Revert "(TreeNode): update markups"
This reverts commit 4d3af82.
1 parent 1114b2e commit 4589d04

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

src/scripts/TreeNode.tsx

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,37 +84,26 @@ const TreeNodeItem: FC<TreeNodeProps & { icon?: string }> = (props) => {
8484
)}
8585
{!leaf ? (
8686
<Button
87-
className='slds-m-right_x-small'
87+
className='slds-m-right_small'
8888
aria-controls=''
8989
aria-hidden='true'
9090
tabIndex={-1}
9191
type='icon-bare'
9292
icon={icon}
93-
iconSize='x-small'
93+
iconSize='small'
9494
onClick={onToggle}
9595
title={typeof label === 'string' ? `Expand ${label}` : undefined}
9696
// Prevent focus loss during loading by keeping the toggle button in the DOM with opacity set to 0.
9797
style={loading ? { opacity: 0, pointerEvents: 'none' } : undefined}
9898
/>
9999
) : null}
100-
<span className='slds-has-flexi-truncate'>
101-
{onLabelClick ? (
102-
<a
103-
className='slds-tree__item-label slds-truncate'
104-
tabIndex={-1}
105-
onClick={onLabelClick}
106-
>
107-
{ItemRender ? <ItemRender {...props} /> : label}
108-
</a>
109-
) : (
110-
<span
111-
className='slds-tree__item-label slds-truncate'
112-
title={typeof label === 'string' ? label : undefined}
113-
>
114-
{ItemRender ? <ItemRender {...props} /> : label}
115-
</span>
116-
)}
117-
</span>
100+
<a
101+
className='slds-truncate'
102+
tabIndex={-1}
103+
onClick={onLabelClick}
104+
>
105+
{ItemRender ? <ItemRender {...props} /> : label}
106+
</a>
118107
{leaf ? children : null}
119108
</div>
120109
);

0 commit comments

Comments
 (0)