MCPcopy
hub / github.com/callstack/react-native-paper / Divider

Function Divider

src/components/Divider.tsx:54–84  ·  view source on GitHub ↗
({
  leftInset,
  horizontalInset = false,
  style,
  theme: themeOverrides,
  bold = false,
  ...rest
}: Props)

Source from the content-addressed store, hash-verified

52 * ```
53 */
54const Divider = ({
55 leftInset,
56 horizontalInset = false,
57 style,
58 theme: themeOverrides,
59 bold = false,
60 ...rest
61}: Props) => {
62 const theme = useInternalTheme(themeOverrides);
63 const { dark: isDarkTheme, isV3 } = theme;
64
65 const dividerColor = isV3
66 ? theme.colors.outlineVariant
67 : color(isDarkTheme ? white : black)
68 .alpha(0.12)
69 .rgb()
70 .string();
71
72 return (
73 <View
74 {...rest}
75 style={[
76 { height: StyleSheet.hairlineWidth, backgroundColor: dividerColor },
77 leftInset && (isV3 ? styles.v3LeftInset : styles.leftInset),
78 isV3 && horizontalInset && styles.horizontalInset,
79 isV3 && bold && styles.bold,
80 style,
81 ]}
82 />
83 );
84};
85
86const styles = StyleSheet.create({
87 leftInset: {

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…