chore: bump toolchain & fix lint

This commit is contained in:
DarkSky
2026-05-24 06:47:17 +08:00
parent adfa51a372
commit 2aa56cbccd
39 changed files with 151 additions and 130 deletions
@@ -13,10 +13,12 @@ export interface AddItemPlaceholderProps extends HTMLAttributes<HTMLDivElement>
icon?: React.ReactNode;
}
const DEFAULT_ICON = <PlusIcon />;
export const AddItemPlaceholder = ({
onClick,
label = 'Add Item',
icon = <PlusIcon />,
icon = DEFAULT_ICON,
className,
...attrs
}: AddItemPlaceholderProps) => {
@@ -22,6 +22,8 @@ import * as styles from './node.css';
interface NavigationPanelTreeNodeProps extends BaseNavigationPanelTreeNodeProps {}
const EMPTY_OPERATIONS: BaseNavigationPanelTreeNodeProps['operations'] = [];
export const NavigationPanelTreeNode = ({
children,
icon: Icon,
@@ -33,9 +35,9 @@ export const NavigationPanelTreeNode = ({
collapsed,
extractEmojiAsIcon,
setCollapsed,
operations = [],
operations = EMPTY_OPERATIONS,
postfix,
childrenOperations = [],
childrenOperations = EMPTY_OPERATIONS,
childrenPlaceholder,
linkComponent: LinkComponent = WorkbenchLink,
...otherProps
@@ -6,9 +6,11 @@ import { useMemo, useState } from 'react';
import * as styles from './root.css';
const EMPTY_OPERATIONS: NodeOperation[] = [];
export const NavigationPanelTreeRoot = ({
children,
childrenOperations = [],
childrenOperations = EMPTY_OPERATIONS,
placeholder,
}: {
children?: React.ReactNode;
@@ -33,11 +33,13 @@ export interface SettingDropdownSelectProps<
native?: boolean;
}
const EMPTY_OPTIONS: DropdownItem<string>[] = [];
export const SettingDropdownSelect = <
V extends string = string,
E extends boolean | undefined = true,
>({
options = [],
options = EMPTY_OPTIONS as DropdownItem<V>[],
value,
emitValue = true,
onChange,
@@ -98,7 +100,7 @@ export const NativeSettingDropdownSelect = <
V extends string = string,
E extends boolean | undefined = true,
>({
options = [],
options = EMPTY_OPTIONS as DropdownItem<V>[],
value,
emitValue = true,
onChange,