Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ import {ViewStyle} from '../../StyleSheet/StyleSheetTypes';
*
* To use this component wrap your custom toolbar with the InputAccessoryView component, and set a nativeID. Then, pass
* that nativeID as the inputAccessoryViewID of whatever TextInput you desire.
*
* InputAccessoryView is deprecated and will be removed in a future release.
* @deprecated
*/
export class InputAccessoryView extends React.Component<InputAccessoryViewProps> {}

/**
* InputAccessoryView is deprecated and will be removed in a future release.
* @deprecated
*/
export interface InputAccessoryViewProps {
backgroundColor?: ColorValue | undefined;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import useWindowDimensions from '../../Utilities/useWindowDimensions';
import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
import * as React from 'react';

/**
* InputAccessoryView is deprecated and will be removed in a future release.
* @deprecated
*/
/** @build-types emit-as-interface Expo compatibility */
export type InputAccessoryViewProps = Readonly<{
readonly children: React.Node,
Expand All @@ -36,8 +40,10 @@ export type InputAccessoryViewProps = Readonly<{
*
* This component can also be used to create sticky text inputs (text inputs which are anchored to the top of the keyboard). To do this, wrap a `TextInput` with `InputAccessoryView` and don't set a `nativeID`.
*
* @see https://reactnative.dev/docs/inputaccessoryview
* InputAccessoryView is deprecated and will be removed in a future release.
*
* @platform ios
* @deprecated
*/
const InputAccessoryView: React.ComponentType<InputAccessoryViewProps> = (
props: InputAccessoryViewProps,
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ module.exports = {
return require('./Libraries/Image/ImageBackground').default;
},
get InputAccessoryView() {
warnOnce(
'input-accessory-view-deprecated',
'InputAccessoryView is deprecated and will be removed in a future release.',
);
return require('./Libraries/Components/TextInput/InputAccessoryView')
.default;
},
Expand Down
Loading