mirror of
https://github.com/mue/mue.git
synced 2026-07-23 00:37:27 +02:00
refactor: begin redesign of tab errors
This commit is contained in:
@@ -7,8 +7,10 @@ import values from 'utils/data/slider_values.json';
|
||||
import EventBus from 'utils/eventbus';
|
||||
|
||||
const PreferencesWrapper = ({ children, ...props }) => {
|
||||
const [shown, setShown] = useState(localStorage.getItem(props.setting) === 'true' || props.default || false);
|
||||
console.log(props.default)
|
||||
const [shown, setShown] = useState(
|
||||
localStorage.getItem(props.setting) === 'true' || props.default || false,
|
||||
);
|
||||
console.log(props.default);
|
||||
|
||||
EventBus.on('toggle', (setting) => {
|
||||
if (setting === props.setting) {
|
||||
@@ -17,13 +19,17 @@ const PreferencesWrapper = ({ children, ...props }) => {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={shown ? 'preferences' : 'opacity-50 pointer-events-none transition-400 ease-in-out'}>
|
||||
<div
|
||||
className={
|
||||
shown
|
||||
? 'preferences bg-modal-content-light dark:bg-modal-content-dark p-10 rounded'
|
||||
: 'opacity-50 pointer-events-none transition-400 ease-in-out bg-modal-content-light dark:bg-modal-content-dark p-10 rounded'
|
||||
}
|
||||
>
|
||||
{props.zoomSetting && (
|
||||
<Row>
|
||||
<Content
|
||||
title={variables.getMessage(
|
||||
'settings:sections.appearance.accessibility.widget_zoom',
|
||||
)}
|
||||
title={variables.getMessage('settings:sections.appearance.accessibility.widget_zoom')}
|
||||
subtitle={variables.getMessage('settings:sections.header.size')}
|
||||
/>
|
||||
<Action>
|
||||
|
||||
Reference in New Issue
Block a user