add basic react wrapper code

This commit is contained in:
Connor Turland 2018-03-05 13:18:51 -05:00
parent a72b4c6871
commit a9f353a07f
19 changed files with 190 additions and 0 deletions

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
<div className="page-header"> <div className="page-header">
@ -7,4 +12,9 @@
{ render 'form', application: @application } { render 'form', application: @application }
</div> </div>
</div> </div>
)
}
}
export default MyComponent
{ render 'script' } { render 'script' }

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
<div className="page-header"> <div className="page-header">
@ -25,4 +30,9 @@
{ link_to t('.new'), new_oauth_application_path, className: 'button link-button' } { link_to t('.new'), new_oauth_application_path, className: 'button link-button' }
</div> </div>
</div> </div>
)
}
}
export default MyComponent
{ render 'script' } { render 'script' }

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
{ link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), className: 'button link-button button-margin' } { link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), className: 'button link-button button-margin' }
@ -8,4 +13,9 @@
{ render 'form', application: @application } { render 'form', application: @application }
</div> </div>
</div> </div>
)
}
}
export default MyComponent
{ render 'script' } { render 'script' }

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent showApp"> <div className="centerContent showApp">
@ -34,4 +39,9 @@
<div className="inline-button">{ render 'delete_form', application: @application, submit_btn_css: 'button red-button' }</div> <div className="inline-button">{ render 'delete_form', application: @application, submit_btn_css: 'button red-button' }</div>
</div> </div>
</div> </div>
)
}
}
export default MyComponent
{ render 'script' } { render 'script' }

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
<div className="page-header"> <div className="page-header">
@ -9,3 +14,8 @@
</main> </main>
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
<header className="page-header" role="banner"> <header className="page-header" role="banner">
@ -46,3 +51,8 @@
</main> </main>
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
<header className="page-header"> <header className="page-header">
@ -9,3 +14,8 @@
</main> </main>
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent"> <div className="centerContent">
<header className="page-header"> <header className="page-header">
@ -34,4 +39,9 @@
</main> </main>
</div> </div>
</div> </div>
)
}
}
export default MyComponent
{ render 'script' } { render 'script' }

View file

@ -1,8 +1,18 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className='centerContent'> <div className='centerContent'>
{ render 'form' } { render 'form' }
</div> </div>
</div> </div>
)
}
}
export default MyComponent
<script> <script>
{ Metacode.all.each do |m| } { Metacode.all.each do |m| }

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className='centerContent'> <div className='centerContent'>
<br /> <br />
@ -34,3 +39,8 @@
</table> </table>
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,8 +1,18 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className='centerContent'> <div className='centerContent'>
{ render 'form' } { render 'form' }
</div> </div>
</div> </div>
)
}
}
export default MyComponent
<script> <script>
{ Metacode.all.each do |m| } { Metacode.all.each do |m| }

View file

@ -1,5 +1,15 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className='centerContent'> <div className='centerContent'>
{ render 'form' } { render 'form' }
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,3 +1,8 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className='centerContent'> <div className='centerContent'>
<br /> <br />
@ -28,3 +33,8 @@
</table> </table>
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,5 +1,15 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className='centerContent'> <div className='centerContent'>
{ render 'form' } { render 'form' }
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,6 +1,11 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent notificationsPage"> <div className="centerContent notificationsPage">
<header className="page-header"> <header className="page-header">
@ -76,3 +81,8 @@
</div> </div>
{ end } { end }
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,6 +1,11 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
<div className="centerContent withPadding back"> <div className="centerContent withPadding back">
{ link_to 'Back to notifications', notifications_path } { link_to 'Back to notifications', notifications_path }
@ -50,3 +55,8 @@
{ end } { end }
</div> </div>
</div> </div>
)
}
}
export default MyComponent

View file

@ -2,6 +2,11 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
{ form_for @user, url: user_url, :html =>{ :multipart => true, :className => "edit_user centerGreyForm"} do |form| } { form_for @user, url: user_url, :html =>{ :multipart => true, :className => "edit_user centerGreyForm"} do |form| }
<h3>Edit Settings</h3> <h3>Edit Settings</h3>
@ -81,3 +86,8 @@
<div className="clearfloat"></div> <div className="clearfloat"></div>
{ end } { end }
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,6 +1,11 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
{ form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :className => "forgotPassword centerGreyForm forgotPasswordReset" }) do |f| } { form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :className => "forgotPassword centerGreyForm forgotPasswordReset" }) do |f| }
{ f.hidden_field :reset_password_token } { f.hidden_field :reset_password_token }
@ -17,4 +22,9 @@
{ end } { end }
</div> </div>
)
}
}
export default MyComponent

View file

@ -1,6 +1,11 @@
import React, { Component } from react
class MyComponent extends Component {
render = () => {
return (
<div id="yield"> <div id="yield">
{ form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :className => "forgotPassword centerGreyForm" }) do |f| } { form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :className => "forgotPassword centerGreyForm" }) do |f| }
@ -13,5 +18,10 @@
{ end } { end }
</div> </div>
)
}
}
export default MyComponent