Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">import</span> <span style="color: #0e84b5; font-weight: bold">React</span><span style="color: #333333">,</span> { Component } <span style="color: #008800; font-weight: bold">from</span> <span style="background-color: #fff0f0">'react'</span>;
- <span style="color: #008800; font-weight: bold">import</span> { View, Text, TextInput } <span style="color: #008800; font-weight: bold">from</span> <span style="background-color: #fff0f0">'react-native'</span>;
- export default <span style="color: #008800; font-weight: bold">class</span> <span style="color: #BB0066; font-weight: bold">App</span> extends Component {
- constructor(props) {
- <span style="color: #007020">super</span>(props);
- this<span style="color: #333333">.</span>state <span style="color: #333333">=</span> {
- text:<span style="background-color: #fff0f0">''</span>
- };
- }
- render() {
- <span style="color: #008800; font-weight: bold">return</span> (
- <span style="color: #333333"><</span>View <span style="color: #333333">></span>
- <span style="color: #333333"><</span>Text style<span style="color: #333333">=</span>{{marginLeft:<span style="color: #0000DD; font-weight: bold">5</span>}}<span style="color: #333333">></span> Comment: <span style="color: #333333"></</span>Text<span style="color: #333333">></span>
- <span style="color: #333333"><</span>TextInput
- multiline<span style="color: #333333">=</span>{true}
- numberOfLines<span style="color: #333333">=</span>{<span style="color: #0000DD; font-weight: bold">4</span>}
- onChangeText<span style="color: #333333">=</span>{text <span style="color: #333333">=></span> this<span style="color: #333333">.</span>setState({ text })}
- value<span style="color: #333333">=</span>{this<span style="color: #333333">.</span>state<span style="color: #333333">.</span>text}
- style<span style="color: #333333">=</span>{{
- borderWidth:<span style="color: #0000DD; font-weight: bold">1</span>,
- marginHorizontal:<span style="color: #0000DD; font-weight: bold">10</span>,
- borderRadius:<span style="color: #0000DD; font-weight: bold">5</span>
- }}
- <span style="color: #333333">/></span>
- <span style="color: #333333"></</span>View<span style="color: #333333">></span>
- );
- }
- }
- </pre></td></tr></table></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement