From e83fbeeefed0a8416b9417f713bc335d79cfbfc7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 Sep 2020 19:33:22 +0200 Subject: pullquote, but may be hidden in the transcript --- .../views/paragraph/components/paragraph.form.js | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'animism-align/frontend/app/views/paragraph/components') diff --git a/animism-align/frontend/app/views/paragraph/components/paragraph.form.js b/animism-align/frontend/app/views/paragraph/components/paragraph.form.js index 6c57b6a..55cb74e 100644 --- a/animism-align/frontend/app/views/paragraph/components/paragraph.form.js +++ b/animism-align/frontend/app/views/paragraph/components/paragraph.form.js @@ -5,8 +5,8 @@ import { connect } from 'react-redux' import actions from 'app/actions' -import { clamp, timestamp, capitalize } from 'app/utils' -import { Select } from 'app/common' +import { timestamp, capitalize } from 'app/utils' +import { Select, Checkbox } from 'app/common' const PARAGRAPH_TYPES = [ 'paragraph', 'intro_paragraph', 'blockquote', 'pullquote', 'big_text', 'hidden', @@ -17,6 +17,7 @@ class ParagraphForm extends Component { super(props) this.handleChange = this.handleChange.bind(this) this.handleSelect = this.handleSelect.bind(this) + this.handleSettingsSelect = this.handleSettingsSelect.bind(this) this.handleSubmit = this.handleSubmit.bind(this) } componentDidMount() { @@ -35,6 +36,16 @@ class ParagraphForm extends Component { [name]: value, }) } + handleSettingsSelect(name, value) { + const { onUpdate, paragraph } = this.props + onUpdate({ + ...paragraph, + settings: { + ...paragraph.settings, + [name]: value, + } + }) + } handleSubmit() { const { paragraph, onClose } = this.props actions.paragraph.update(paragraph) @@ -45,6 +56,7 @@ class ParagraphForm extends Component { } render() { const { paragraph, y } = this.props + console.log(paragraph) return (
{this.renderButtons()} +
+ +
) } -- cgit v1.2.3-70-g09d2