blob: dff5e688340cd8c95bfd993d7cf8f81cd12aba97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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>
)
}
|