Flattened the sidebar tree

This commit is contained in:
Gregory Schier
2025-10-17 15:07:02 -07:00
parent 6e9b1db196
commit c34ea20406
14 changed files with 418 additions and 370 deletions
+4 -1
View File
@@ -1,7 +1,7 @@
import type { Color } from '@yaakapp-internal/plugins';
import classNames from 'classnames';
import * as lucide from 'lucide-react';
import type { HTMLAttributes } from 'react';
import type { CSSProperties, HTMLAttributes } from 'react';
import { memo } from 'react';
const icons = {
@@ -127,6 +127,7 @@ const icons = {
export interface IconProps {
icon: keyof typeof icons;
className?: string;
style?: CSSProperties;
size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
spin?: boolean;
title?: string;
@@ -138,12 +139,14 @@ export const Icon = memo(function Icon({
color = 'default',
spin,
size = 'md',
style,
className,
title,
}: IconProps) {
const Component = icons[icon] ?? icons._unknown;
return (
<Component
style={style}
title={title}
className={classNames(
className,