Skip to content

Commit

Permalink
feat(icon): add icon component based on codicons
Browse files Browse the repository at this point in the history
  • Loading branch information
wewoor committed Nov 20, 2020
1 parent a32c78c commit 2f6a071
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/icon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { classNames, prefixClaName } from 'mo/common/className';
import * as React from 'react';

export interface IIcon {
type: string;
className?: string;
}

export function Icon(props: IIcon) {
const { className, type, ...others } = props;
return (
<span className={classNames(className, 'codicon', prefixClaName(type, 'codicon'))} {...others}></span>
)
}

0 comments on commit 2f6a071

Please sign in to comment.