diff --git a/entry_types/scrolled/package/src/contentElements/soundDisclaimer/SoundDisclaimer.js b/entry_types/scrolled/package/src/contentElements/soundDisclaimer/SoundDisclaimer.js
index 00cdcc1e39..91de7fe8c3 100644
--- a/entry_types/scrolled/package/src/contentElements/soundDisclaimer/SoundDisclaimer.js
+++ b/entry_types/scrolled/package/src/contentElements/soundDisclaimer/SoundDisclaimer.js
@@ -7,7 +7,7 @@ import styles from './SoundDisclaimer.module.css';
import MutedIcon from './muted.svg';
import UnmutedIcon from './unmuted.svg';
-export function SoundDisclaimer() {
+export function SoundDisclaimer({configuration}) {
const {isEditable, isSelected} = useContentElementEditorState();
const {t} = useI18n();
const muted = useMediaMuted();
@@ -18,11 +18,17 @@ export function SoundDisclaimer() {
-
+
+ {configuration.unmutedText ||
+ t('pageflow_scrolled.public.sound_disclaimer.help_unmuted')}
+
);
diff --git a/entry_types/scrolled/package/src/contentElements/soundDisclaimer/editor.js b/entry_types/scrolled/package/src/contentElements/soundDisclaimer/editor.js
index aef663fab2..47283d5de7 100644
--- a/entry_types/scrolled/package/src/contentElements/soundDisclaimer/editor.js
+++ b/entry_types/scrolled/package/src/contentElements/soundDisclaimer/editor.js
@@ -1,4 +1,7 @@
-import {editor, NoOptionsHintView} from 'pageflow-scrolled/editor';
+import I18n from 'i18n-js';
+
+import {editor} from 'pageflow-scrolled/editor';
+import {TextInputView} from 'pageflow/ui';
import pictogram from './pictogram.svg';
@@ -7,9 +10,19 @@ editor.contentElementTypes.register('soundDisclaimer', {
category: 'media',
supportedPositions: ['inline'],
- configurationEditor() {
+ configurationEditor({entry}) {
this.tab('general', function() {
- this.view(NoOptionsHintView);
+ this.input('mutedText', TextInputView, {
+ placeholder: I18n.t('pageflow_scrolled.public.sound_disclaimer.help_muted', {
+ locale: entry.metadata.get('locale')
+ })
+ });
+
+ this.input('unmutedText', TextInputView, {
+ placeholder: I18n.t('pageflow_scrolled.public.sound_disclaimer.help_unmuted', {
+ locale: entry.metadata.get('locale')
+ })
+ });
});
}
});
diff --git a/entry_types/scrolled/package/src/contentElements/soundDisclaimer/stories.js b/entry_types/scrolled/package/src/contentElements/soundDisclaimer/stories.js
index 4d9490b325..0999ed5331 100644
--- a/entry_types/scrolled/package/src/contentElements/soundDisclaimer/stories.js
+++ b/entry_types/scrolled/package/src/contentElements/soundDisclaimer/stories.js
@@ -3,5 +3,14 @@ import {storiesOfContentElement} from 'pageflow-scrolled/spec/support/stories';
storiesOfContentElement(module, {
typeName: 'soundDisclaimer',
- baseConfiguration: {}
+ baseConfiguration: {},
+ variants: [
+ {
+ name: 'With custom texts',
+ configuration: {
+ mutedText: 'Unmute now for the best experience.',
+ unmutedText: 'Unmuted! Have fun!',
+ }
+ }
+ ]
});