From b2bf2d4c06268528bf42222db26ba0e503f235e2 Mon Sep 17 00:00:00 2001 From: Stephen Grider Date: Sat, 28 Mar 2015 18:16:07 -0700 Subject: [PATCH] exploring state and events - part 4 --- dropdown/src/dropdown.jsx | 8 +++++++- dropdown/src/list-item.jsx | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 dropdown/src/list-item.jsx diff --git a/dropdown/src/dropdown.jsx b/dropdown/src/dropdown.jsx index 0c8bd85..6705fff 100644 --- a/dropdown/src/dropdown.jsx +++ b/dropdown/src/dropdown.jsx @@ -4,13 +4,16 @@ var React = require('react'); var Button = require('./button'); -// var List = require('./list'); +var ListItem = require('./list-item'); module.exports = React.createClass({ handleClick: function() { alert('hello from dropdown'); }, render: function() { + var list = this.props.items.map(function(item){ + return + }); return
} }); diff --git a/dropdown/src/list-item.jsx b/dropdown/src/list-item.jsx new file mode 100644 index 0000000..7e512fc --- /dev/null +++ b/dropdown/src/list-item.jsx @@ -0,0 +1,7 @@ +var React = require('react'); + +module.exports = React.createClass({ + render: function() { + return
  • {this.props.item}
  • + } +});