diff options
Diffstat (limited to 'frontend/app/views/tile/forms/tile.form.sound.js')
| -rw-r--r-- | frontend/app/views/tile/forms/tile.form.sound.js | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/frontend/app/views/tile/forms/tile.form.sound.js b/frontend/app/views/tile/forms/tile.form.sound.js new file mode 100644 index 0000000..0662725 --- /dev/null +++ b/frontend/app/views/tile/forms/tile.form.sound.js @@ -0,0 +1,53 @@ +import React from 'react' + +import { + Checkbox, +} from 'app/common' + +import AudioSelect from 'app/views/audio/components/audio.select' + +export default function TileSoundForm({ tile, parent }) { + return ( + <div> + <Checkbox + label="Sound effects" + name="has_audio" + className='short' + checked={tile.settings.has_audio} + onChange={parent.handleSettingsSelect} + /> + {tile.settings.has_audio && ( + <div> + <div className='row single'> + <AudioSelect + title="On click" + name="audio_on_click_id" + selected={tile.settings.audio_on_click_id} + onChange={parent.handleSettingsSelect} + /> + </div> + + {!!tile.settings.audio_on_click_id && ( + <Checkbox + label="Navigate when audio finishes" + name="navigate_when_audio_finishes" + className='short' + checked={tile.settings.navigate_when_audio_finishes} + onChange={parent.handleSettingsSelect} + autoComplete="off" + /> + )} + + <div className='row single'> + <AudioSelect + title="On hover" + name="audio_on_hover_id" + selected={tile.settings.audio_on_hover_id} + onChange={parent.handleSettingsSelect} + /> + </div> + </div> + )} + </div> + ) +} |
