File tree 3 files changed +19
-3
lines changed
3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const FileTypes = {
22
22
} ;
23
23
export type FileType = 'file' | 'folder' ;
24
24
25
+ < < << << < HEAD
25
26
export interface ITreeNodeItem {
26
27
name ?: string ;
27
28
type ?: FileType ;
@@ -242,6 +243,21 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
242
243
{ renderTreeNodes ( data ) }
243
244
</ Tree >
244
245
</ div >
246
+ =======
247
+ export interface ITree { }
248
+
249
+ interface ITreeProps extends TreeProps { }
250
+
251
+ const defaultTreeClassName = prefixClaName('tree');
252
+
253
+ export const Tree: React.FunctionComponent< ITreeProps > = (
254
+ props: ITreeProps
255
+ ) => {
256
+ const { className, ...custom } = props ;
257
+ return (
258
+ < div className = { classNames ( defaultTreeClassName , className ) } >
259
+ < RcTree { ...custom } />
260
+ >>> >>> > refactor ( tree ) : convert the naming to BEM standard
245
261
< / d i v >
246
262
) ;
247
263
} ;
Original file line number Diff line number Diff line change 1
1
@import ' mo/style/common' ;
2
- $tree : ' tree' ;
2
+ $tree : prefix ( ' tree' ) ;
3
3
4
- #{prefix ( $tree ) } {
4
+ #{$tree } {
5
5
font-size : 13px ;
6
6
7
7
.rc-tree {
Original file line number Diff line number Diff line change 143
143
}
144
144
145
145
// =============== Tree =============== //
146
- #{prefix ( $tree ) } {
146
+ #{$tree } {
147
147
.rc-tree-treenode {
148
148
& :hover {
149
149
background-color : #333 ;
You can’t perform that action at this time.
0 commit comments