feat: first commit
This commit is contained in:
13
src/components/badge/index.less
Normal file
13
src/components/badge/index.less
Normal file
@ -0,0 +1,13 @@
|
||||
.badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #FFFFFF;
|
||||
background: #FF5051;
|
||||
font-size: 24px;
|
||||
line-height: 34px;
|
||||
padding: 0 8px;
|
||||
border-radius: 10px;
|
||||
border-bottom-left-radius: 0;
|
||||
transform: translate3d(30%, -50%, 0);
|
||||
}
|
||||
16
src/components/badge/index.tsx
Normal file
16
src/components/badge/index.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import classNames from 'classnames';
|
||||
import './index.less';
|
||||
|
||||
interface IProps {
|
||||
text: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const PREFIX = 'badge';
|
||||
|
||||
function Badge(props: IProps) {
|
||||
const { className, text } = props;
|
||||
return <div className={classNames(PREFIX, className)}>{text}</div>;
|
||||
}
|
||||
|
||||
export default Badge;
|
||||
Reference in New Issue
Block a user