summaryrefslogtreecommitdiff
path: root/frontend/app/views/tile/forms/tile.form.element.gradient.js
blob: 3e35cc05e550ee1eb1eae6a559899c1a3786ebf5 (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
import React from 'react'

import { NumberInput, ColorInput, Slider } from 'app/common'

export default function TileGradientForm({ tile, parent }) {
  return (
    <div>
      <ColorInput
        title='From'
        name='from_color'
        data={tile.settings}
        onChange={parent.handleSettingsChange}
        autoComplete="off"
      />
      <Slider
        title='Opacity'
        name='from_opacity'
        value={tile.settings.from_opacity}
        onChange={parent.handleSettingsSelect}
        min={0.0}
        max={1.0}
        step={0.01}
      />
      <ColorInput
        title='To'
        name='to_color'
        data={tile.settings}
        onChange={parent.handleSettingsChange}
        autoComplete="off"
      />
      <Slider
        title='Opacity'
        name='to_opacity'
        value={tile.settings.to_opacity}
        onChange={parent.handleSettingsSelect}
        min={0.0}
        max={1.0}
        step={0.01}
      />
      <Slider
        title='Angle'
        name='angle'
        value={tile.settings.angle}
        onChange={parent.handleSettingsSelect}
        min={0.0}
        max={360.0}
        step={0.1}
      />
      <Slider
        title='Stop'
        name='stop'
        value={tile.settings.stop}
        onChange={parent.handleSettingsSelect}
        min={0.0}
        max={100.0}
        step={0.1}
      />
      <div className='row pair'>
        <NumberInput
          title="Width"
          name="width"
          data={tile.settings}
          min={0}
          max={2400}
          onChange={parent.handleSettingsChange}
          autoComplete="off"
        />
        <NumberInput
          title="Height"
          name="height"
          data={tile.settings}
          min={0}
          max={2400}
          onChange={parent.handleSettingsChange}
          autoComplete="off"
        />
      </div>
    </div>
  )
}