Skip to content

Commit 0c35c3b

Browse files
committed
feat: add ToolBar component
1 parent df20a80 commit 0c35c3b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/components/toolbar/index.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import './style.scss';
2+
import * as React from 'react';
3+
import { prefixClaName, classNames } from 'mo/common/className';
4+
import ActionBar, { IActionBar } from 'mo/components/actionbar';
5+
6+
export interface IToolBar<T = any> extends IActionBar {
7+
}
8+
9+
const rootClassName = 'tool-bar';
10+
11+
export default function ToolBar<T = any>(props: IToolBar<T>) {
12+
const { className, ...others } = props;
13+
14+
return (
15+
<div className={classNames(prefixClaName(rootClassName), className)}>
16+
<ActionBar {...others}/>
17+
</div>
18+
)
19+
}

src/components/toolbar/style.scss

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@import 'mo/style/const';
2+
$toolBar: 'tool-bar';
3+
4+
#{prefix($toolBar)} {
5+
color: inherit;
6+
}

0 commit comments

Comments
 (0)