| 1234567891011121314151617181920 |
- 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 <View className='new_header_bg'>
- <View className='h50 bold'>{props.title}</View>
- {
- (props.type == NewHeaderType.center_subtitle || props.type == NewHeaderType.left_subtitle) &&
- <View className='h30' style={{ color: MainColorType.g01,marginTop:rpxToPx(12) ,lineHeight:rpxToPx(45)+'px'}}>{props.subtitle}</View>
- }
- </View>
- }
|