refactor: begin redesign of tab errors

This commit is contained in:
alexsparkes
2024-08-17 23:50:13 +01:00
parent 7178983a36
commit bf64f56f7c
15 changed files with 98 additions and 81 deletions

View File

@@ -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>