import { View, Text } from '@tarojs/components' import './new_header.scss' import { MainColorType } from '@/context/themes/color' import { rpxToPx } from '@/utils/tools' export enum NewHeaderType { center = 'center', center_subtitle = 'center_subtitle', left = 'left', left_subtitle = 'left_subtitle' } export default function NewHeader(props: { type: NewHeaderType, title: string, subtitle?: string }) { return {props.title} { (props.type == NewHeaderType.center_subtitle || props.type == NewHeaderType.left_subtitle) && {props.subtitle} } }