Skip to content

Instantly share code, notes, and snippets.

@robertcasanova
Created September 19, 2015 14:22
Show Gist options
  • Select an option

  • Save robertcasanova/d222b85a972fb94b8e80 to your computer and use it in GitHub Desktop.

Select an option

Save robertcasanova/d222b85a972fb94b8e80 to your computer and use it in GitHub Desktop.

Revisions

  1. robertcasanova created this gist Sep 19, 2015.
    7 changes: 7 additions & 0 deletions OyXLJm.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    OyXLJm
    ------


    A [Pen](http://codepen.io/anon/pen/OyXLJm) by [Captain Anonymous](http://codepen.io/anon) on [CodePen](http://codepen.io/).

    [License](http://codepen.io/anon/pen/OyXLJm/license).
    1 change: 1 addition & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    <div id="reactApp"></div>
    29 changes: 29 additions & 0 deletions script.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    var Rating = React.createClass({
    render: function() {
    return (
    <div className="rating">
    <i className="fa fa-star"></i>
    <i className="fa fa-star"></i>
    <i className="fa fa-star"></i>
    <i className="fa fa-star-o"></i>
    <i className="fa fa-star-o"></i>
    </div>
    )
    }
    })


    var ReactApp = React.createClass({
    render: function() {
    return (
    <div>
    <Rating />
    </div>
    )
    }
    })

    React.render(
    <ReactApp />,
    document.getElementById('reactApp')
    );
    1 change: 1 addition & 0 deletions scripts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    <script src="//cdnjs.cloudflare.com/ajax/libs/react/0.13.0/react.min.js"></script>
    6 changes: 6 additions & 0 deletions style.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    .rating {
    i {
    font-size: 30px;
    color: #f2a818;
    }
    }
    1 change: 1 addition & 0 deletions styles
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" />