import React from 'react'; import type { TreeItemContentProps, TreeItemContentRenderProps, TreeItemProps as RACTreeItemProps, TreeProps, } from 'react-aria-components'; import { Button, TreeItemContent as RACTreeItemContent, TreeItem as RACTreeItem, Tree as RACTree, } from 'react-aria-components'; import { Checkbox } from '../Checkbox/Checkbox'; export interface TreeItemProps extends Partial { title: string; } export function TreeItemContent( props: Omit & { children?: React.ReactNode; }, ) { return ( {({ hasChildItems, selectionBehavior, selectionMode, }: TreeItemContentRenderProps) => ( <> {selectionBehavior === 'toggle' && selectionMode !== 'none' && ( )} {props.children} )} ); } export function TreeItem(props: TreeItemProps) { return ( {props.title} {props.children} ); } export function Tree({ children, ...props }: TreeProps) { return {children}; }