23 lines
480 B
TypeScript
23 lines
480 B
TypeScript
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;
|