summaryrefslogtreecommitdiff
path: root/frontend/app/views/tile/forms/tile.form.misc.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/views/tile/forms/tile.form.misc.js')
-rw-r--r--frontend/app/views/tile/forms/tile.form.misc.js98
1 files changed, 98 insertions, 0 deletions
diff --git a/frontend/app/views/tile/forms/tile.form.misc.js b/frontend/app/views/tile/forms/tile.form.misc.js
new file mode 100644
index 0000000..dff5e68
--- /dev/null
+++ b/frontend/app/views/tile/forms/tile.form.misc.js
@@ -0,0 +1,98 @@
+import React from 'react'
+
+import {
+ TextInput,
+ Select, Checkbox, Slider,
+} from 'app/common'
+
+import { UNITS } from './tile.constants'
+
+export default function TileMiscForm({ tile, parent }) {
+ return (
+ <div>
+ <div className='row single'>
+ <Select
+ name='units'
+ selected={tile.settings.units || 'px'}
+ options={UNITS}
+ title='Units'
+ onChange={parent.handleSettingsSelect}
+ />
+ </div>
+ <Slider
+ title='Opacity'
+ name='opacity'
+ value={tile.settings.opacity}
+ onChange={parent.handleSettingsSelect}
+ min={0.0}
+ max={1.0}
+ step={0.01}
+ />
+ <Slider
+ title='Scale'
+ name='scale'
+ value={tile.settings.scale}
+ onChange={parent.handleSettingsSelect}
+ min={0.01}
+ max={10.0}
+ step={0.01}
+ />
+ <Slider
+ title='Rotation'
+ name='rotation'
+ value={tile.settings.rotation}
+ onChange={parent.handleSettingsSelect}
+ min={-180.0}
+ max={180.0}
+ step={1}
+ type='int'
+ />
+ <Checkbox
+ label="Element is a Popup"
+ name="is_popup"
+ className='short'
+ checked={tile.settings.is_popup}
+ onChange={parent.handleSettingsSelect}
+ autoComplete="off"
+ />
+ {tile.settings.is_popup && (
+ <div className='row single_text'>
+ <TextInput
+ title="Popup group"
+ name="popup_group"
+ data={tile.settings}
+ onChange={parent.handleSettingsChange}
+ autoComplete="off"
+ />
+ </div>
+ )}
+ <Checkbox
+ label="Wait to appear"
+ name="wait_to_appear"
+ className='short'
+ checked={tile.settings.wait_to_appear}
+ onChange={parent.handleSettingsSelect}
+ autoComplete="off"
+ />
+ {tile.settings.wait_to_appear && (
+ <div className='row single_text'>
+ <TextInput
+ title="Appear after"
+ name="appear_after"
+ data={tile.settings}
+ onChange={parent.handleSettingsChange}
+ autoComplete="off"
+ />
+ </div>
+ )}
+ <Checkbox
+ label="Hide on click"
+ name="hide_on_click"
+ className='short'
+ checked={tile.settings.hide_on_click}
+ onChange={parent.handleSettingsSelect}
+ autoComplete="off"
+ />
+ </div>
+ )
+}