mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 17:34:07 +08:00
Added placeholder attributes example to RNTester (#23769)
Summary: After some works, we already support some attributes to text input's placeholder, so we can add example to show it in RNTester. [iOS] [Added] - Added placeholder attributes example to RNTester Pull Request resolved: https://github.com/facebook/react-native/pull/23769 Differential Revision: D14436086 Pulled By: cpojer fbshipit-source-id: 8637dcb82a2e6aa51e351fd696b049aaee893997
This commit is contained in:
committed by
Facebook Github Bot
parent
01033d16ec
commit
9df493dc94
@@ -530,6 +530,11 @@ const styles = StyleSheet.create({
|
||||
padding: 4,
|
||||
marginBottom: 4,
|
||||
},
|
||||
multilinePlaceholderStyles: {
|
||||
letterSpacing: 10,
|
||||
lineHeight: 20,
|
||||
textAlign: 'center',
|
||||
},
|
||||
multilineExpandable: {
|
||||
height: 'auto',
|
||||
maxHeight: 100,
|
||||
@@ -541,6 +546,10 @@ const styles = StyleSheet.create({
|
||||
fontFamily: 'Cochin',
|
||||
height: 60,
|
||||
},
|
||||
singlelinePlaceholderStyles: {
|
||||
letterSpacing: 10,
|
||||
textAlign: 'center',
|
||||
},
|
||||
eventLabel: {
|
||||
margin: 3,
|
||||
fontSize: 12,
|
||||
@@ -1124,4 +1133,26 @@ exports.examples = [
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'TextInput Placeholder Styles',
|
||||
render: function() {
|
||||
return (
|
||||
<View>
|
||||
<WithLabel label="letterSpacing: 10 lineHeight: 20 textAlign: 'center'">
|
||||
<TextInput
|
||||
placeholder="multiline text input"
|
||||
multiline={true}
|
||||
style={[styles.multiline, styles.multilinePlaceholderStyles]}
|
||||
/>
|
||||
</WithLabel>
|
||||
<WithLabel label="letterSpacing: 10 textAlign: 'center'">
|
||||
<TextInput
|
||||
placeholder="singleline"
|
||||
style={[styles.default, styles.singlelinePlaceholderStyles]}
|
||||
/>
|
||||
</WithLabel>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user