mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
fixes
This commit is contained in:
@@ -110,13 +110,18 @@ function SidebarItem({ item, collapsed, activePath, onNavigate, opened, onToggle
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Parent headers always carry a chevron so the expand/collapse state is
|
// Parent headers always carry a chevron so the expand/collapse state is
|
||||||
// never ambiguous, even when a badge is also present.
|
// never ambiguous, even when a badge is also present. One icon rotated
|
||||||
|
// (rather than swapping icons) so the toggle animates instead of jumping.
|
||||||
const chevron = hasChildren ? (
|
const chevron = hasChildren ? (
|
||||||
opened ? (
|
<IconChevronRight
|
||||||
<IconChevronDown size={14} stroke={1.8} color="var(--mantine-color-gray-5)" />
|
size={14}
|
||||||
) : (
|
stroke={1.8}
|
||||||
<IconChevronRight size={14} stroke={1.8} color="var(--mantine-color-gray-5)" />
|
color="var(--mantine-color-gray-5)"
|
||||||
)
|
style={{
|
||||||
|
transform: opened ? 'rotate(90deg)' : 'rotate(0deg)',
|
||||||
|
transition: 'transform 200ms ease',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
const soonBadge = (
|
const soonBadge = (
|
||||||
|
|||||||
Reference in New Issue
Block a user