Merge pull request #33795 from saranshkataria/react-native-update

added maxFontSizeMultiplier to text ios props
This commit is contained in:
Eloy Durán
2019-03-13 10:45:37 +01:00
committed by GitHub
2 changed files with 19 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
// Ryan Nickel <https://github.com/mrnickel>
// Souvik Ghosh <https://github.com/souvik-ghosh>
// Cheng Gibson <https://github.com/nossbigg>
// Saransh Kataria <https://github.com/saranshkataria>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -903,6 +904,14 @@ export interface TextProps extends TextPropsIOS, TextPropsAndroid, Accessibility
* Used to reference react managed views from native code.
*/
nativeID?: string;
/**
* Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:
* - null/undefined (default): inherit from the parent node or the global default (0)
* - 0: no max, ignore parent/global default
* - >= 1: sets the maxFontSizeMultiplier of this node to this value
*/
maxFontSizeMultiplier?: number | null;
}
/**
@@ -1427,6 +1436,14 @@ export interface TextInputProps extends ViewProps, TextInputIOSProps, TextInputA
* or set/update maxLength to prevent unwanted edits without flicker.
*/
value?: string;
/**
* Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:
* - null/undefined (default): inherit from the parent node or the global default (0)
* - 0: no max, ignore parent/global default
* - >= 1: sets the maxFontSizeMultiplier of this node to this value
*/
maxFontSizeMultiplier?: number | null;
}
/**

View File

@@ -834,6 +834,8 @@ const NativeIDTest = () => (
</ScrollView>
);
const MaxFontSizeMultiplierTest = () => <Text maxFontSizeMultiplier={0}>Text</Text>;
const ShareTest = () => {
Share.share(
{ title: "title", message: "message" },