33 lines
895 B
TypeScript
33 lines
895 B
TypeScript
import { View, Image } from "@tarojs/components";
|
|
import img from "@/config/images";
|
|
import styles from "./index.module.scss";
|
|
import { useGlobalState } from "@/store/global";
|
|
import Taro from "@tarojs/taro";
|
|
|
|
const ListHeader = () => {
|
|
const { statusNavbarHeightInfo } = useGlobalState();
|
|
const { statusBarHeight, navbarHeight, totalHeight } = statusNavbarHeightInfo;
|
|
const handleBack = () => {
|
|
Taro.navigateBack();
|
|
}
|
|
|
|
return (
|
|
<View
|
|
className={styles.customerNavbarBack}
|
|
style={{ height: `${totalHeight}px` }}
|
|
>
|
|
<View
|
|
className={styles.container}
|
|
style={{
|
|
height: `${navbarHeight}px`,
|
|
paddingTop: `${statusBarHeight}px`,
|
|
}}
|
|
>
|
|
{/* back */}
|
|
<Image src={img.ICON_LIST_SEARCH_BACK} className={styles.back} onClick={handleBack} />
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
export default ListHeader;
|