Update resolvedicon.jsx
Remove unnecessary variable, restoring the fallback code in case no custom icon color is provided.
This commit is contained in:
parent
5264ffd071
commit
9a71c4de12
@ -57,10 +57,8 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// default to theme setting if no custom icon color code is provided
|
// default to theme setting if no custom icon color code is provided
|
||||||
const iconColor = settings.iconStyle === "theme" ?
|
|
||||||
`rgb(var(--color-${ theme === "dark" ? 300 : 900 }) / var(--tw-text-opacity, 1))` :
|
|
||||||
"linear-gradient(180deg, rgb(var(--color-logo-start)), rgb(var(--color-logo-stop)))";
|
|
||||||
const iconName = icon.replace(`${prefix}-`, "").replace(".svg", "");
|
const iconName = icon.replace(`${prefix}-`, "").replace(".svg", "");
|
||||||
const iconSource = `${iconSetURLs[prefix]}${iconName}.svg`;
|
const iconSource = `${iconSetURLs[prefix]}${iconName}.svg`;
|
||||||
return (
|
return (
|
||||||
@ -70,7 +68,9 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log
|
|||||||
height,
|
height,
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
maxHeight: '100%',
|
maxHeight: '100%',
|
||||||
background: `${iconColor}`,
|
background: settings.iconStyle === "theme" ?
|
||||||
|
`rgb(var(--color-${ theme === "dark" ? 300 : 900 }) / var(--tw-text-opacity, 1))` :
|
||||||
|
"linear-gradient(180deg, rgb(var(--color-logo-start)), rgb(var(--color-logo-stop)))",
|
||||||
mask: `url(${iconSource}) no-repeat center / contain`,
|
mask: `url(${iconSource}) no-repeat center / contain`,
|
||||||
WebkitMask: `url(${iconSource}) no-repeat center / contain`,
|
WebkitMask: `url(${iconSource}) no-repeat center / contain`,
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user