Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/autodemo/src/AutoDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const AutoDemo = ({
treeRef3: React.Ref<TreeRef>,
treeRef4: React.Ref<TreeRef>,
treeRef5: React.Ref<TreeRef>
) => JSX.Element;
) => React.ReactElement;
storyScript: (story: AutomationStoryHelpers) => Promise<void>;
restart?: boolean;
}) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/tree/TreeManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useTreeEnvironment } from '../controlledEnvironment/ControlledTreeEnvir
import { useDragAndDrop } from '../drag/DragAndDropProvider';
import { MaybeLiveDescription } from './MaybeLiveDescription';

export const TreeManager = (): JSX.Element => {
export const TreeManager = (): React.ReactElement => {
const { treeId, rootItem, renderers, treeInformation } = useTree();
const environment = useTreeEnvironment();
const containerRef = useRef<HTMLElement>();
Expand Down Expand Up @@ -68,5 +68,5 @@ export const TreeManager = (): JSX.Element => {
children: treeChildren,
info: treeInformation,
containerProps,
}) as JSX.Element;
}) as React.ReactElement;
};
4 changes: 2 additions & 2 deletions packages/core/src/treeItem/TreeItemChildren.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export const TreeItemChildren = (props: {
children: TreeItemIndex[];
depth: number;
parentId: TreeItemIndex;
}): JSX.Element => {
}): React.ReactElement => {
const { renderers, treeInformation } = useTree();

const childElements: JSX.Element[] = [];
const childElements: React.ReactElement[] = [];

for (const child of props.children) {
childElements.push(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/treeItem/TreeItemElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { TreeItemRenamingInput } from './TreeItemRenamingInput';
export const TreeItemElement = (props: {
itemIndex: TreeItemIndex;
depth: number;
}): JSX.Element => {
}): React.ReactElement => {
const [hasBeenRequested, setHasBeenRequested] = useState(false);
const { renderers, treeInformation, renamingItem } = useTree();
const environment = useTreeEnvironment();
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/treeItem/TreeItemRenamingInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ export const TreeItemRenamingInput: React.FC<{
submitButtonRef,
formProps,
inputProps,
}) as JSX.Element;
}) as React.ReactElement;
};
4 changes: 2 additions & 2 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export interface ControlledTreeEnvironmentProps<
T = any,
C extends string = never
> extends TreeEnvironmentConfiguration<T, C> {
children?: JSX.Element | (JSX.Element | null)[] | null;
children?: React.ReactElement | (React.ReactElement | null)[] | null;
}

export interface UncontrolledTreeEnvironmentProps<
Expand All @@ -382,7 +382,7 @@ export interface UncontrolledTreeEnvironmentProps<
keyboardBindings?: KeyboardBindings;
liveDescriptors?: LiveDescriptors;
getItemTitle: (item: TreeItem<T>) => string;
children: JSX.Element | (JSX.Element | null)[] | null;
children: React.ReactElement | (React.ReactElement | null)[] | null;
disableMultiselect?: boolean;
}

Expand Down
Loading