homepage/src/components
Mega-Volti 1560bb7762
Support custom colors for icons (#1724)
* Add custom colors to resolvedicon.jsx

Enables appending a color code (e.g. "#123456") to all mdi and si icons, in order to change their color to a per-icon custom one.

* Streamline code for custom icon colors in resolvedicon.jsx 

Removed redundant if statement when defaulting to theme colors if no custom icon color code is provided

* Update resolvedicon.jsx

Remove unnecessary variable, restoring the fallback code in case no custom icon color is provided.

* Update resolvedicon.jsx - test for custom color suffix

Changed if condition from string.match to string.test and expanded regex to also include upper case letters.

* Update resolvedicon.jsx - DRY

Removed repetition, slimmed down if statement.

Also reverse previous commit as it did not work as intended.

* Update resolvedicon.jsx - upper case color hex codes

Update regular expression to also allow for upper case letters as part of the hex color code, as either are valid when describing an objects color.

* Refactor custom color code

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-07-25 17:31:42 -07:00
..
bookmarks Improve disclosure collapse animation 2023-07-22 00:50:54 -07:00
services Merge pull request #1704 from rauenzi/disclosure-collapse 2023-07-22 00:55:06 -07:00
toggles further restructuring 2022-09-26 15:25:10 +03:00
widgets Ensure spacing with custom logo 2023-07-25 12:02:13 -07:00
errorboundry.jsx place error boundaries closer to the source 2022-10-05 13:43:22 +03:00
favicon.jsx new logo and styling tweaks 2022-10-08 16:04:24 +03:00
quicklaunch.jsx Handle duplicate keys for bookmarks 2023-05-01 19:54:33 -07:00
resolvedicon.jsx Support custom colors for icons (#1724) 2023-07-25 17:31:42 -07:00
version.jsx Use server-side endpoint to properly cache GH release data 2022-12-28 18:33:14 -08:00