-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/app 708 widget menu settings (#118)
* add: icons for menu settings * add: placeholder layout for widget preview in menu settings * update: load saved settings and updated imports * add: logics for handling and saving menu settings * add: useSavedSettings hook * update: set export as default for Sidebar layout * add: widget menu settings layout and settings * update: add widget menu settings and widget preview layouts * add: hide/show minimum option alert notification * update: styling of the save button * update: save settings logic to use async/await * fix: accessibility text icon
- Loading branch information
Showing
30 changed files
with
641 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import AlignLeftIcon from '@elementor/icons/AlignLeftIcon'; | ||
import LinkIcon from '@elementor/icons/LinkIcon'; | ||
import { | ||
GrayscaleIcon, | ||
LineHeightIcon, | ||
ReadableFontIcon, | ||
TextSizeIcon, | ||
ContrastIcon, | ||
PageStructureIcon, | ||
SiteMapIcon, | ||
ReadingPanelIcon, | ||
HideImagesIcon, | ||
PauseAnimationsIcon, | ||
} from '@ea11y/icons'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
const iconStyle = { color: 'black' }; | ||
|
||
export const MENU_SETTINGS = { | ||
'content-adjustments': { | ||
title: __('Content Adjustments', 'pojo-accessibility'), | ||
options: { | ||
'text-size': { | ||
title: __('Adjust text size', 'pojo-accessibility'), | ||
icon: <TextSizeIcon sx={iconStyle} />, | ||
}, | ||
'line-height': { | ||
title: __('Adjust line height', 'pojo-accessibility'), | ||
icon: <LineHeightIcon sx={iconStyle} />, | ||
}, | ||
'align-text': { | ||
title: __('Align text', 'pojo-accessibility'), | ||
icon: <AlignLeftIcon sx={iconStyle} />, | ||
}, | ||
'readable-font': { | ||
title: __('Readable font', 'pojo-accessibility'), | ||
icon: <ReadableFontIcon sx={iconStyle} />, | ||
}, | ||
}, | ||
}, | ||
'color-adjustments': { | ||
title: __('Color Adjustments', 'pojo-accessibility'), | ||
options: { | ||
greyscale: { | ||
title: __('Greyscale', 'pojo-accessibility'), | ||
icon: <GrayscaleIcon sx={iconStyle} />, | ||
}, | ||
contrast: { | ||
title: __('Contrast', 'pojo-accessibility'), | ||
icon: <ContrastIcon sx={iconStyle} />, | ||
}, | ||
}, | ||
}, | ||
'orientation-adjustments': { | ||
title: __('Orientation Adjustments', 'pojo-accessibility'), | ||
options: { | ||
'page-structure': { | ||
title: __('Page structure', 'pojo-accessibility'), | ||
icon: <PageStructureIcon sx={iconStyle} />, | ||
}, | ||
'site-map': { | ||
title: __('Site map', 'pojo-accessibility'), | ||
icon: <SiteMapIcon sx={iconStyle} />, | ||
}, | ||
'reading-panel': { | ||
title: __('Reading panel', 'pojo-accessibility'), | ||
icon: <ReadingPanelIcon sx={iconStyle} />, | ||
}, | ||
'hide-images': { | ||
title: __('Hide images', 'pojo-accessibility'), | ||
icon: <HideImagesIcon sx={iconStyle} />, | ||
}, | ||
'pause-animations': { | ||
title: __('Pause animations', 'pojo-accessibility'), | ||
icon: <PauseAnimationsIcon sx={iconStyle} />, | ||
}, | ||
'highlight-links': { | ||
title: __('Highlight links', 'pojo-accessibility'), | ||
icon: <LinkIcon sx={iconStyle} />, | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.