/* eslint-disable react/jsx-props-no-spreading */ import * as React from 'react'; import { StyleProp, StyleSheet, TextStyle, TouchableWithoutFeedback, View, ViewStyle, } from 'react-native'; import type { Theme, $RemoveChildren } from '../../types'; import { withTheme } from '../../core/theming'; import { Text } from '../..'; type Props = $RemoveChildren & { // titleRef?: React.RefObject; // TODO: titleRef onPress?: () => void; style?: StyleProp; subtitle?: React.ReactNode; subtitleStyle?: StyleProp; theme: Theme; title: React.ReactNode; titleRef?: React.RefObject; titleStyle?: StyleProp; }; const AppbarContent = ({ // titleRef, onPress, style, subtitle, subtitleStyle, theme, title, titleStyle, ...rest }: Props) => { return ( {title} {subtitle ? ( {subtitle} ) : null} ); }; // TODO: attach displayName to every component? AppbarContent.displayName = 'Appbar.Content'; const styles = StyleSheet.create({ container: { flex: 1, paddingHorizontal: 12, }, title: { fontSize: 16, }, subtitle: { fontSize: 12, }, }); export default withTheme(AppbarContent);