Skip to content

Commit

Permalink
change(theme): Add theme picker widget #70 from eea/color_pick_themes
Browse files Browse the repository at this point in the history
  • Loading branch information
ichim-david authored Feb 2, 2023
2 parents e6ffe28 + 4bbdec3 commit f217995
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
],
"dependencies": {
"@eeacms/volto-resize-helper": "*",
"react-color": "~2.18.1"
"react-color": "~2.18.1",
"@eeacms/volto-widget-theme-picker": "*"
},
"devDependencies": {
"@cypress/code-coverage": "^3.10.0",
Expand Down
11 changes: 8 additions & 3 deletions src/StyleWrapper/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ export const StyleSchema = () => {
theme: {
title: 'Theme',
description: 'A predefined theme, applicable just to this block',
choices: [
['primary', 'Primary'],
['secondary', 'Secondary'],
widget: 'theme_picker',
colors: [
...(config.settings && config.settings.themeColors
? config.settings.themeColors.map(({ value, title }) => ({
name: value,
label: title,
}))
: []),
],
},
style_name: {
Expand Down

0 comments on commit f217995

Please sign in to comment.