i don't fucking care any more

This commit is contained in:
jane 2021-12-07 22:34:17 -05:00
parent 7c3182c8a8
commit 72926c1b74
13 changed files with 297 additions and 130 deletions

View file

@ -0,0 +1,26 @@
// Run this example by adding <%= javascript_pack_tag 'hello_react' %> to the head of your layout file,
// like app/views/layouts/application.html.erb. All it does is render <div>Hello React</div> at the bottom
// of the page.
import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
const Hello = props => (
<div>Hello {props.name}!</div>
)
Hello.defaultProps = {
name: 'David'
}
Hello.propTypes = {
name: PropTypes.string
}
document.addEventListener('DOMContentLoaded', () => {
ReactDOM.render(
<Hello name="React" />,
document.body.appendChild(document.createElement('div')),
)
})

View file

@ -11,6 +11,9 @@
</head>
<body>
<div class='jsx'>
<%= javascript_pack_tag 'menubar' %>
</div>
<div class="notification" style="display: flex; align-items: flex-start; justify-content: flex-start;">
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>