(props: Props)
| 47 | * ``` |
| 48 | */ |
| 49 | const 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 | |
| 76 | DialogActions.displayName = 'Dialog.Actions'; |
| 77 |
nothing calls this directly
no test coverage detected
searching dependent graphs…