Created
January 16, 2017 06:56
-
-
Save farmanp/6f63142893aaccab8924bd71af166a88 to your computer and use it in GitHub Desktop.
Finding out how to use Bootstrap in React-Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render: function () { | |
return ( | |
<div bsClass="container-fluid"> | |
<div bsClass="row-fluid"> | |
<div className="email-box"> | |
<EmailList emails={ this.state.emails } /> | |
<hr /> | |
<h2>Add a Email:</h2> | |
<EmailForm form={ this.state.form } onEmailSubmit={ this.handleEmailSubmit } /> | |
</div> | |
</div> | |
</div> | |
); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a manifest file that'll be compiled into application.css, which will include all the files | |
* listed below. | |
* | |
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. | |
* | |
* You're free to add application-wide styles to this file and they'll appear at the bottom of the | |
* compiled file so the styles you add here take precedence over styles defined in any styles | |
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new | |
* file per style scope. | |
* | |
*= require_tree . | |
*= require_self | |
*= bootstrap-sprockets | |
*= bootstrap | |
*/ | |
.email-box h2 { | |
color: red; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a manifest file that'll be compiled into application.js, which will include all the files | |
// listed below. | |
// | |
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. | |
// | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// compiled file. | |
// | |
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details | |
// about supported directives. | |
// | |
//= require jquery | |
//= require jquery_ujs | |
//= require turbolinks | |
//= require react | |
//= require react_ujs | |
//= require react_bootstrap | |
//= require bootstrap-sprockets | |
//= require components | |
//= require_tree ./components | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row"> | |
<%= react_component('EmailBox', {:presenter => @presenter.to_json}) %> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment