mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 06:48:47 +00:00
Feature: add category icons (#301)
* Update setting.yaml mapping * Implement adding icon to categoryTitle * Move resolveIcon func to utils for reusability * Turn off default export eslint rule * Fix util typo * Revert "Turn off default export eslint rule" This reverts commit e8dd853ba6fac1d33253667ffe9e02010a8dcfd6. * fix resolveIcon export * Revert "Update setting.yaml mapping" This reverts commit 78c947766951e14d1f6db290c0ab03ccc8f1ebc3. * Revert "Implement adding icon to categoryTitle" * Use settings layout for group icon * Revert "Fix util typo" This reverts commit ab49b426ec6d925d7938c3ddec753a0e7c8759af. * ResolvedIcon component Co-authored-by: Mindfreak9100 <dhoom_rik@yahoo.com> Co-authored-by: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
bfd4e7e890
commit
71faaa56dc
4 changed files with 51 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
import classNames from "classnames";
|
||||
|
||||
import List from "components/services/list";
|
||||
import ResolvedIcon from "components/resolvedicon";
|
||||
|
||||
export default function ServicesGroup({ services, layout }) {
|
||||
return (
|
||||
|
@ -11,7 +12,14 @@ export default function ServicesGroup({ services, layout }) {
|
|||
"flex-1 p-1"
|
||||
)}
|
||||
>
|
||||
<h2 className="text-theme-800 dark:text-theme-300 text-xl font-medium">{services.name}</h2>
|
||||
<div className="flex select-none items-center">
|
||||
{layout?.icon &&
|
||||
<div className="flex-shrink-0 mr-2 w-7 h-7">
|
||||
<ResolvedIcon icon={layout.icon} />
|
||||
</div>
|
||||
}
|
||||
<h2 className="text-theme-800 dark:text-theme-300 text-xl font-medium">{services.name}</h2>
|
||||
</div>
|
||||
<List services={services.services} layout={layout} />
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue