react-native-keyboard-controller
Version:
Keyboard manager which works in identical way on both iOS and Android
40 lines (39 loc) • 1.31 kB
TypeScript
import React from "react";
import type { View, ViewProps } from "react-native";
export type KeyboardStickyViewProps = {
/**
* Specify additional offset to the view for given keyboard state.
*/
offset?: {
/**
* Adds additional `translateY` when keyboard is close. By default `0`.
*/
closed?: number;
/**
* Adds additional `translateY` when keyboard is open. By default `0`.
*/
opened?: number;
};
/** Controls whether this `KeyboardStickyView` instance should take effect. Default is `true` */
enabled?: boolean;
} & ViewProps;
declare const KeyboardStickyView: React.ForwardRefExoticComponent<{
/**
* Specify additional offset to the view for given keyboard state.
*/
offset?: {
/**
* Adds additional `translateY` when keyboard is close. By default `0`.
*/
closed?: number;
/**
* Adds additional `translateY` when keyboard is open. By default `0`.
*/
opened?: number;
};
/** Controls whether this `KeyboardStickyView` instance should take effect. Default is `true` */
enabled?: boolean;
} & ViewProps & {
children?: React.ReactNode | undefined;
} & React.RefAttributes<View>>;
export default KeyboardStickyView;