mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
chore: bump toolchain & fix lint
This commit is contained in:
+3
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user