mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-30 23:22:41 +08:00
Move default spacing out of csslayout
Reviewed By: foghina Differential Revision: D3709574 fbshipit-source-id: 6e0277bd97407a5c642d742f93ca2ac70d7307da
This commit is contained in:
committed by
Facebook Github Bot 4
parent
a2a8d7f5da
commit
fd34c6d567
@@ -241,6 +241,23 @@ class BlurOnSubmitExample extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
class ToggleDefaultPaddingExample extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {hasPadding: false};
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<TextInput style={this.state.hasPadding ? { padding: 0 } : null}/>
|
||||
<Text onPress={() => this.setState({hasPadding: !this.state.hasPadding})}>
|
||||
Toggle padding
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var styles = StyleSheet.create({
|
||||
multiline: {
|
||||
height: 60,
|
||||
@@ -602,4 +619,8 @@ exports.examples = [
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Toggle Default Padding',
|
||||
render: function(): ReactElement { return <ToggleDefaultPaddingExample />; },
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user