MCPcopy Create free account
hub / github.com/callstack/react-native-paper / DialogTitle

Function DialogTitle

src/components/Dialog/DialogTitle.tsx:49–75  ·  view source on GitHub ↗
({
  children,
  theme: themeOverrides,
  style,
  ...rest
}: Props)

Source from the content-addressed store, hash-verified

47 * ```
48 */
49const DialogTitle = ({
50 children,
51 theme: themeOverrides,
52 style,
53 ...rest
54}: Props) => {
55 const theme = useInternalTheme(themeOverrides);
56 const { isV3, colors, fonts } = theme;
57
58 const TextComponent = isV3 ? Text : Title;
59
60 const headerTextStyle = {
61 color: isV3 ? colors.onSurface : colors?.text,
62 ...(isV3 ? fonts.headlineSmall : {}),
63 };
64
65 return (
66 <TextComponent
67 variant="headlineSmall"
68 accessibilityRole="header"
69 style={[styles.text, isV3 && styles.v3Text, headerTextStyle, style]}
70 {...rest}
71 >
72 {children}
73 </TextComponent>
74 );
75};
76
77DialogTitle.displayName = 'Dialog.Title';
78

Callers

nothing calls this directly

Calls 1

useInternalThemeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…