react-native-ui-lib
Version:
[](https://stand-with-ukraine.pp.ua)
64 lines (63 loc) • 1.99 kB
TypeScript
import React, { PropsWithChildren } from 'react';
import { ButtonProps } from '../button';
export declare enum FloatingButtonLayouts {
VERTICAL = "Vertical",
HORIZONTAL = "Horizontal"
}
export interface FloatingButtonProps {
/**
* Whether the button is visible
*/
visible?: boolean;
/**
* Button element (all Button's component's props)
*/
button?: PropsWithChildren<ButtonProps>;
/**
* Secondary button element (all Button's component's props)
*/
secondaryButton?: PropsWithChildren<ButtonProps>;
/**
* The bottom margin of the button, or secondary button if passed
*/
bottomMargin?: number;
/**
* Whether the buttons get the container's full width (vertical layout only)
*/
fullWidth?: boolean;
/**
* Button layout direction: vertical or horizontal
*/
buttonLayout?: FloatingButtonLayouts | `${FloatingButtonLayouts}`;
/**
* The duration of the button's animations (show/hide)
*/
duration?: number;
/**
* Whether to show/hide the button without animation
*/
withoutAnimation?: boolean;
/**
* Whether to show background overlay
*/
hideBackgroundOverlay?: boolean;
/**
* Whether the footer should be hoisted above the keyboard.
* When true (default), uses KeyboardAccessoryView for keyboard-aware positioning.
* When false, uses sticky positioning.
*/
hoisted?: boolean;
/**
* Used as testing identifier
* <TestID> - the floatingButton container
* <TestID>.button - the floatingButton main button
* <TestID>.secondaryButton - the floatingButton secondaryButton
*/
testID?: string;
}
declare const _default: React.ForwardRefExoticComponent<FloatingButtonProps & React.RefAttributes<any>> & {
(props: FloatingButtonProps): React.JSX.Element | null;
displayName: string;
floatingButtonLayouts: typeof FloatingButtonLayouts;
};
export default _default;