|
1 | 1 | import React, {PropsWithChildren, useEffect, useMemo} from 'react'; |
2 | 2 | import {StyleSheet} from 'react-native'; |
3 | | -import {asBaseComponent} from '../../commons/new'; |
| 3 | +import {asBaseComponent, Constants} from '../../commons/new'; |
4 | 4 | import {LogService} from '../../services'; |
5 | 5 | import {Colors, Shadows, Spacings} from '../../style'; |
6 | 6 | import Button, {ButtonProps} from '../button'; |
7 | | -import ScreenFooter, {ScreenFooterLayouts, ScreenFooterBackgrounds, KeyboardBehavior, ItemsFit} from '../screenFooter'; |
| 7 | +import ScreenFooter, {ScreenFooterProps, ScreenFooterLayouts, ScreenFooterBackgrounds, KeyboardBehavior, ItemsFit} from '../screenFooter'; |
8 | 8 |
|
9 | 9 | export enum FloatingButtonLayouts { |
10 | 10 | VERTICAL = 'Vertical', |
11 | 11 | HORIZONTAL = 'Horizontal' |
12 | 12 | } |
13 | 13 |
|
14 | | -export interface FloatingButtonProps { |
| 14 | +export interface FloatingButtonProps extends Pick<ScreenFooterProps, 'isAndroidEdgeToEdge'> { |
15 | 15 | /** |
16 | 16 | * Whether the button is visible |
17 | 17 | */ |
@@ -80,7 +80,8 @@ const FloatingButton = (props: FloatingButtonProps) => { |
80 | 80 | duration = 300, |
81 | 81 | withoutAnimation, |
82 | 82 | hideBackgroundOverlay, |
83 | | - hoisted = true, |
| 83 | + hoisted = Constants.isAndroid, |
| 84 | + isAndroidEdgeToEdge, |
84 | 85 | testID |
85 | 86 | } = props; |
86 | 87 |
|
@@ -159,6 +160,7 @@ const FloatingButton = (props: FloatingButtonProps) => { |
159 | 160 | layout={isHorizontal ? ScreenFooterLayouts.HORIZONTAL : ScreenFooterLayouts.VERTICAL} |
160 | 161 | backgroundType={hideBackgroundOverlay ? ScreenFooterBackgrounds.TRANSPARENT : ScreenFooterBackgrounds.FADING} |
161 | 162 | keyboardBehavior={hoisted ? KeyboardBehavior.HOISTED : KeyboardBehavior.STICKY} |
| 163 | + isAndroidEdgeToEdge={isAndroidEdgeToEdge} |
162 | 164 | animationDuration={withoutAnimation ? 0 : duration} |
163 | 165 | itemsFit={fullWidth ? ItemsFit.STRETCH : undefined} |
164 | 166 | contentContainerStyle={footerContentContainerStyle} |
|
0 commit comments