mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
8bced4b29d
Summary: **History:** This component was originally introduced into React Native core in D52712758, to replace UIManagerModule.showPopupMenu(). **Problem:** But, React Native core should be lean. Adding this component to React Native bloats the core. **Changes:** So, this diff pulls PopupMenuAndroid out into its own package in the react-native GitHub repository. In the future, this will be migrated to a community package! Changelog: [Android][Removed] Move PopupMenu out of React Native core Reviewed By: NickGerleman Differential Revision: D53328110 fbshipit-source-id: 469d8dc3e756c06040c72e08fa004aafa1bd6e18
25 lines
612 B
TypeScript
25 lines
612 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import type * as React from 'react';
|
|
import {HostComponent} from 'react-native';
|
|
|
|
type PopupMenuAndroidInstance = {
|
|
show: () => void;
|
|
};
|
|
|
|
type Props = {
|
|
menuItems: Array<string>;
|
|
onSelectionChange: (number) => void;
|
|
children: React.ReactNode | undefined;
|
|
instanceRef: React.ElementRef<HostComponent<PopupMenuAndroidInstance>>;
|
|
};
|
|
|
|
declare class PopupMenuAndroid extends React.Component<Props> {}
|