Skip to content

Commit

Permalink
themepicker work with pluggableStyles only
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Jan 20, 2023
1 parent a97b27e commit 8db32a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 56 deletions.
48 changes: 15 additions & 33 deletions src/Widgets/ThemePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,21 @@ const ThemePicker = (props) => {

<div className="buttons">
{colors.map((color) => {
if (color.type === 'pluggable') {
return (
<Button
key={id + color.name}
className={color.name}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onChange(id, color.name);
}}
active={value === color.name}
circular
aria-label={color.label}
title={color.label}
/>
);
} else {
return (
<Button
key={id + color.name}
style={{ backgroundColor: color.name }}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onChange(id, color.name);
}}
active={value === color.name}
circular
aria-label={color.label}
title={'Color: ' + color.label}
/>
);
}
return (
<Button
key={id + color.name}
className={color.name}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onChange(id, color.name);
}}
active={value === color.name}
circular
aria-label={color.label}
title={color.label}
/>
);
})}
</div>
</div>
Expand Down
23 changes: 0 additions & 23 deletions src/helpers.js

This file was deleted.

0 comments on commit 8db32a7

Please sign in to comment.