{
+ if (item.subItems) {
+ handleExpand();
+ } else {
+ setActiveItem(item.name);
+ }
+ }}
+ role="button"
+ tabIndex={0}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ if (item.subItems) {
+ handleExpand();
+ } else {
+ setActiveItem(item.name);
+ }
+ }
+ }}
+ >
+
+ {item.icon}
+ {item.name}
+
+ {item.subItems &&
+ (expanded ? (
+
+ ) : (
+
+ ))}
+
+ {expanded && item.subItems && (
+