import { View, Text } from '@tarojs/components'
import './SectionHeader.scss'
import Taro from '@tarojs/taro';
import { rpxToPx } from '@/utils/tools';

export default function Component(props: {
    top: number,
    bottom: number,
    title: string,
    children?: React.ReactNode,
}) {
    return <View className='section_header'
        style={{
            marginTop: rpxToPx(props.top),
            marginBottom: rpxToPx(props.bottom),
            backgroundColor: global.isDebug ? 'red' : 'transparent'
        }}>
        <Text className='section_header_title'>{props.title}</Text>
        {
            props.children
        }
    </View>
}