zordius/webtasks

View on GitHub
react/LimitSelect.jsx

Summary

Maintainability
A
0 mins
Test Coverage
/** @jsx React.DOM */
var React = require('react'),

LimitSelect = React.createClass({
    render: function () {
        var options = [],
            I;

        for (I=0;I<this.props.max;I++) {
            options.push(
                <option>{I+1}</option>
            );
        }

        return (
            <select>
             {options}
            </select>
        );
    }
});

module.exports = LimitSelect;