import { View, Text } from '@tarojs/components'; import { ReactNode } from 'react'; import './index.scss'; interface SectionTitleProps { title: string; subtitle?: string; action?: { text: string; onPress: () => void }; icon?: ReactNode; } const SectionTitle: React.FC = ({ title, subtitle, action, icon, }) => { return ( {icon && {icon}} {title} {subtitle && {subtitle}} {action && ( {action.text} )} ); }; export default React.memo(SectionTitle);