diff --git a/web/components/enum-settings-option.react.js b/web/components/enum-settings-option.react.js --- a/web/components/enum-settings-option.react.js +++ b/web/components/enum-settings-option.react.js @@ -20,6 +20,7 @@ type Props = { +selected: boolean, +onSelect: () => void, + +disabled?: boolean, +icon: React.Node, +title: string, +type?: InputType, @@ -38,6 +39,7 @@ statements, selected, onSelect, + disabled = false, type = 'radio', iconPosition = 'center', } = props; @@ -59,15 +61,15 @@ [selected, statements], ); - const inputIcon = React.useMemo( - () => - type === 'checkbox' ? ( - - ) : ( - - ), - [type, selected], - ); + const inputIcon = React.useMemo(() => { + if (disabled) { + return null; + } else if (type === 'checkbox') { + return ; + } else if (type === 'radio') { + return ; + } + }, [disabled, type, selected]); const optionContainerClasses = React.useMemo( () => @@ -83,7 +85,10 @@ ); return ( -
+
{icon}
{title}
diff --git a/web/modals/threads/notifications/notifications-modal.react.js b/web/modals/threads/notifications/notifications-modal.react.js --- a/web/modals/threads/notifications/notifications-modal.react.js +++ b/web/modals/threads/notifications/notifications-modal.react.js @@ -158,10 +158,11 @@ title="Background" statements={backgroundStatements} icon={icon} + disabled={isSidebar} onSelect={onBackgroundSelected} /> ); - }, [isBackgroundSelected, onBackgroundSelected]); + }, [isBackgroundSelected, onBackgroundSelected, isSidebar]); const dispatchActionPromise = useDispatchActionPromise();