fix: Light icons are not responsive to dark theme
This commit is contained in:
@@ -16,7 +16,7 @@ import { IconButton } from "./IconButton";
|
||||
const BUTTON_SIZE = 32;
|
||||
|
||||
type OutlineNode = {
|
||||
type: IconType.Outline;
|
||||
type: IconType.SVG;
|
||||
name: string;
|
||||
color: string;
|
||||
initial: string;
|
||||
@@ -66,7 +66,7 @@ const GridTemplate = (
|
||||
);
|
||||
|
||||
const items = node.icons.map((item) => {
|
||||
if (item.type === IconType.Outline) {
|
||||
if (item.type === IconType.SVG) {
|
||||
return (
|
||||
<IconButton
|
||||
key={item.name}
|
||||
|
||||
@@ -129,7 +129,7 @@ const IconPanel = ({
|
||||
const baseIcons: DataNode = {
|
||||
category,
|
||||
icons: filteredIcons.map((name, index) => ({
|
||||
type: IconType.Outline,
|
||||
type: IconType.SVG,
|
||||
name,
|
||||
color,
|
||||
initial,
|
||||
@@ -144,7 +144,7 @@ const IconPanel = ({
|
||||
{
|
||||
category: DisplayCategory.Frequent,
|
||||
icons: freqIcons.map((name, index) => ({
|
||||
type: IconType.Outline,
|
||||
type: IconType.SVG,
|
||||
name,
|
||||
color,
|
||||
initial,
|
||||
|
||||
@@ -98,7 +98,7 @@ const IconPicker = ({
|
||||
(ic: string) => {
|
||||
popover.hide();
|
||||
const icType = determineIconType(ic);
|
||||
const finalColor = icType === IconType.Outline ? chosenColor : null;
|
||||
const finalColor = icType === IconType.SVG ? chosenColor : null;
|
||||
onChange(ic, finalColor);
|
||||
},
|
||||
[popover, onChange, chosenColor]
|
||||
@@ -110,7 +110,7 @@ const IconPicker = ({
|
||||
|
||||
const icType = determineIconType(icon);
|
||||
// Outline icon set; propagate color change
|
||||
if (icType === IconType.Outline) {
|
||||
if (icType === IconType.SVG) {
|
||||
onChange(icon, c);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user