Skip to content

Commit 2f6a071

Browse files
committed
feat(icon): add icon component based on codicons
1 parent a32c78c commit 2f6a071

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/icon/index.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { classNames, prefixClaName } from 'mo/common/className';
2+
import * as React from 'react';
3+
4+
export interface IIcon {
5+
type: string;
6+
className?: string;
7+
}
8+
9+
export function Icon(props: IIcon) {
10+
const { className, type, ...others } = props;
11+
return (
12+
<span className={classNames(className, 'codicon', prefixClaName(type, 'codicon'))} {...others}></span>
13+
)
14+
}

0 commit comments

Comments
 (0)