diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-11 14:38:02 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-11 14:38:02 +0100 |
| commit | 37896f6960f8145a13e2943fbb0cde52da430d30 (patch) | |
| tree | 40cb7ca2a6b470dc397dd0ba99998ad899a212b0 /animism-align/frontend/app/views/editor/sidebar/components/script.component.js | |
| parent | 64cd37eae81845dc5eaace17739a72299cfc6c67 (diff) | |
move sidebar and timeline out of align folder
Diffstat (limited to 'animism-align/frontend/app/views/editor/sidebar/components/script.component.js')
| -rw-r--r-- | animism-align/frontend/app/views/editor/sidebar/components/script.component.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/editor/sidebar/components/script.component.js b/animism-align/frontend/app/views/editor/sidebar/components/script.component.js new file mode 100644 index 0000000..d23b3da --- /dev/null +++ b/animism-align/frontend/app/views/editor/sidebar/components/script.component.js @@ -0,0 +1,22 @@ +import React, { Component } from 'react' +// import { Link } from 'react-router-dom' +import { connect } from 'react-redux' + +import actions from 'app/actions' + +const Script = ({ text }) => { + if (text.loading) return null + return ( + <textarea + className='script' + onChange={e => actions.site.updateText(e.target.value)} + value={text} + /> + ) +} + +const mapStateToProps = state => ({ + text: state.align.text, +}) + +export default connect(mapStateToProps)(Script) |
