mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
feat(permissions-android): export Rationale type and add missing properties according to docs (#23510)
Summary: I checked the documentation over at https://facebook.github.io/react-native/docs/permissionsandroid and the documented properties `buttonPositive`, `buttonNegative` and `buttonNeutral` are not available in the flow-type definitions. ___ Also the Rationale type is not exported which makes it hard to reuse it in a library or in your own application code. However I do not know if it is actually intended to import "internal" flow-types from `react-native` since I could not find any other type or interface being exported. So I am not 100% sure if I should have done this. [General] [Added] - Export Rationale flow-type and add missing properties `buttonPositive`, `buttonNegative` and `buttonNeutral` to the documentation. Pull Request resolved: https://github.com/facebook/react-native/pull/23510 Differential Revision: D14123848 Pulled By: cpojer fbshipit-source-id: 4040590932db645da6422d680246fed1d46dbe79
This commit is contained in:
committed by
Facebook Github Bot
parent
e10d984c43
commit
3e4d353d2c
@@ -12,9 +12,12 @@
|
||||
|
||||
const NativeModules = require('NativeModules');
|
||||
|
||||
type Rationale = {
|
||||
export type Rationale = {
|
||||
title: string,
|
||||
message: string,
|
||||
buttonPositive?: string,
|
||||
buttonNegative?: string,
|
||||
buttonNeutral?: string,
|
||||
};
|
||||
|
||||
type PermissionStatus = 'granted' | 'denied' | 'never_ask_again';
|
||||
|
||||
Reference in New Issue
Block a user