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

Function DialogActions

src/components/Dialog/DialogActions.tsx:49–74  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

47 * ```
48 */
49const DialogActions = (props: Props) => {
50 const { isV3 } = useInternalTheme(props.theme);
51 const actionsLength = React.Children.toArray(props.children).length;
52
53 return (
54 <View
55 {...props}
56 style={[isV3 ? styles.v3Container : styles.container, props.style]}
57 >
58 {React.Children.map(props.children, (child, i) =>
59 React.isValidElement<DialogActionChildProps>(child)
60 ? React.cloneElement(child, {
61 compact: true,
62 uppercase: !isV3,
63 style: [
64 isV3 && {
65 marginRight: i + 1 === actionsLength ? 0 : 8,
66 },
67 child.props.style,
68 ],
69 })
70 : child
71 )}
72 </View>
73 );
74};
75
76DialogActions.displayName = 'Dialog.Actions';
77

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…