import React, { Component } from 'react';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { CommonThemeProps } from '../types';
import { Tree as NextTree } from '@alifd/next';
import { TreeProps as NextTreeProps } from '@alifd/next/types/tree';
interface TreeProps extends NextTreeProps, CommonThemeProps {}

class Tree extends Component<TreeProps> {
  static Node = NextTree.Node;

  render() {
    const { prefix = 'next-', className } = this.props;
    // 带线条模式
    return <NextTree {...this.props} prefix={prefix} className={className} />;
  }
}

hoistNonReactStatics(Tree, NextTree);

export default Tree;
