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

Function ListSubheader

src/components/List/ListSubheader.tsx:38–68  ·  view source on GitHub ↗
({
  style,
  theme: overrideTheme,
  maxFontSizeMultiplier,
  ...rest
}: Props)

Source from the content-addressed store, hash-verified

36 * ```
37 */
38const ListSubheader = ({
39 style,
40 theme: overrideTheme,
41 maxFontSizeMultiplier,
42 ...rest
43}: Props) => {
44 const theme = useInternalTheme(overrideTheme);
45
46 const textColor = theme.isV3
47 ? theme.colors.onSurfaceVariant
48 : color(theme.colors.text).alpha(0.54).rgb().string();
49
50 const font = theme.isV3 ? theme.fonts.bodyMedium : theme.fonts.medium;
51
52 return (
53 <Text
54 variant="bodyMedium"
55 numberOfLines={1}
56 maxFontSizeMultiplier={maxFontSizeMultiplier}
57 {...rest}
58 style={[
59 styles.container,
60 {
61 color: textColor,
62 ...font,
63 },
64 style,
65 ]}
66 />
67 );
68};
69
70ListSubheader.displayName = 'List.Subheader';
71

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…