Skip to content

Commit 08b9732

Browse files
committed
refactor(tree): convert the naming to BEM standard
1 parent 5a9c71e commit 08b9732

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/components/tree/index.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const FileTypes = {
2222
};
2323
export type FileType = 'file' | 'folder';
2424

25+
<<<<<<< HEAD
2526
export interface ITreeNodeItem {
2627
name?: string;
2728
type?: FileType;
@@ -242,6 +243,21 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
242243
{renderTreeNodes(data)}
243244
</Tree>
244245
</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
245261
</div>
246262
);
247263
};

src/components/tree/style.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import 'mo/style/common';
2-
$tree: 'tree';
2+
$tree: prefix('tree');
33

4-
#{prefix($tree)} {
4+
#{$tree} {
55
font-size: 13px;
66

77
.rc-tree {

src/style/theme.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
}
144144

145145
// =============== Tree =============== //
146-
#{prefix($tree)} {
146+
#{$tree} {
147147
.rc-tree-treenode {
148148
&:hover {
149149
background-color: #333;

0 commit comments

Comments
 (0)