feat: first commit
This commit is contained in:
28
src/components/switch-bar/index.less
Normal file
28
src/components/switch-bar/index.less
Normal file
@ -0,0 +1,28 @@
|
||||
@import '@/styles/common.less';
|
||||
@import '@/styles/variables.less';
|
||||
|
||||
.switch-bar {
|
||||
height: 64px;
|
||||
padding: 0 16px;
|
||||
.flex-row();
|
||||
border-radius: 50px;
|
||||
border: 2px solid #97979733;
|
||||
background: #FFFFFF;
|
||||
|
||||
&:active {
|
||||
background: #F1F1F1;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 28px;
|
||||
line-height:40px;
|
||||
font-weight: 500;
|
||||
color: @blColor;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
22
src/components/switch-bar/index.tsx
Normal file
22
src/components/switch-bar/index.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { Image } from '@tarojs/components';
|
||||
|
||||
import './index.less';
|
||||
|
||||
interface IProps {
|
||||
title: string;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
const PREFIX = 'switch-bar';
|
||||
|
||||
function SwitchBar(props: IProps) {
|
||||
const { title, onClick } = props;
|
||||
return (
|
||||
<div className={PREFIX} onClick={onClick}>
|
||||
<div className="title">{title}</div>
|
||||
<Image mode="aspectFit" className="icon" src={require('@/statics/svg/switch-app-mode.svg')} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SwitchBar;
|
||||
Reference in New Issue
Block a user