Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added new widget <ListWidget>.
- Loading branch information
Showing
with
22 additions
and
0 deletions.
-
+22
−0
webpack_in/entry.jsx
|
@@ -42,10 +42,32 @@ class TextWidget extends React.Component { |
|
|
} |
|
|
} |
|
|
|
|
|
class ListWidget extends React.Component { |
|
|
render() { |
|
|
return ( |
|
|
<div style={ objStyleCommon }> |
|
|
<div style={ objStyleContent }> |
|
|
<ul style={{ display: 'inline-block' }}> |
|
|
<li>Item 1</li> |
|
|
<li>Item 2</li> |
|
|
<li>Item 3</li> |
|
|
</ul> |
|
|
</div> |
|
|
<div> |
|
|
<button style={{ margin: '1em'}}>Add new item...</button> |
|
|
<button style={{ margin: '1em'}}>Edit item...</button> |
|
|
<button style={{ margin: '1em'}}>Remove item...</button> |
|
|
</div> |
|
|
</div> |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ReactDOM.render( |
|
|
<div> |
|
|
<HelloWidget /> |
|
|
<TextWidget /> |
|
|
<ListWidget /> |
|
|
</div>, |
|
|
document.getElementById('react-app')); |