Implement TextInput.clearButtonMode added by D1875684 on OSS fork + example

This commit is contained in:
Tadeu Zagallo
2015-02-27 08:40:52 -08:00
parent c7b5a1ddfa
commit 078300ce08
3 changed files with 42 additions and 0 deletions

View File

@@ -185,4 +185,37 @@ exports.examples = [
);
}
},
{
title: 'Clear button mode',
render: function () {
return (
<View>
<WithLabel label="never">
<TextInput
style={styles.default}
clearButtonMode={TextInput.clearButtonModeTypes.never}
/>
</WithLabel>
<WithLabel label="while editing">
<TextInput
style={styles.default}
clearButtonMode={TextInput.clearButtonModeTypes.whileEditing}
/>
</WithLabel>
<WithLabel label="unless editing">
<TextInput
style={styles.default}
clearButtonMode={TextInput.clearButtonModeTypes.unlessEditing}
/>
</WithLabel>
<WithLabel label="always">
<TextInput
style={styles.default}
clearButtonMode={TextInput.clearButtonModeTypes.always}
/>
</WithLabel>
</View>
);
}
},
];