diff --git a/src/renderer/components/+catalog/catalog-entity-details.scss b/src/renderer/components/+catalog/catalog-entity-details.module.css similarity index 68% rename from src/renderer/components/+catalog/catalog-entity-details.scss rename to src/renderer/components/+catalog/catalog-entity-details.module.css index f63e7c3ba3..27b2c69701 100644 --- a/src/renderer/components/+catalog/catalog-entity-details.scss +++ b/src/renderer/components/+catalog/catalog-entity-details.module.css @@ -19,25 +19,32 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - .CatalogEntityDetails { - .EntityMetadata { - margin-right: $margin; - } - .EntityIcon.box.top.left { - margin-right: $margin * 2; +.entityDetails { + /* Move Details panel under TopBar line */ + height: calc(100% - var(--main-layout-header)); + margin-top: var(--main-layout-header); +} - .IconHint { - text-align: center; - font-size: var(--font-size-small); - text-transform: uppercase; - margin-top: $margin; - cursor: default; - user-select: none; - opacity: 0.5; - } +.metadata { + margin-right: var(--margin); +} - div * { - font-size: 1.5em; +.entityIcon { + margin-right: calc(var(--margin) * 3); + + .avatar { + :global(.MuiAvatar-root) { + font-size: 3ch; } - } - } + } + + .hint { + text-align: center; + font-size: var(--font-size-small); + text-transform: uppercase; + margin-top: var(--margin); + cursor: default; + user-select: none; + opacity: 0.5; + } +} diff --git a/src/renderer/components/+catalog/catalog-entity-details.tsx b/src/renderer/components/+catalog/catalog-entity-details.tsx index bff73a3fa2..40bc63fdee 100644 --- a/src/renderer/components/+catalog/catalog-entity-details.tsx +++ b/src/renderer/components/+catalog/catalog-entity-details.tsx @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import "./catalog-entity-details.scss"; +import styles from "./catalog-entity-details.module.css"; import React, { Component } from "react"; import { observer } from "mobx-react"; import { Drawer, DrawerItem } from "../drawer"; @@ -30,6 +30,7 @@ import { CatalogEntityDetailRegistry } from "../../../extensions/registries"; import { HotbarIcon } from "../hotbar/hotbar-icon"; import type { CatalogEntityItem } from "./catalog-entity-item"; import { isDevelopment } from "../../../common/vars"; +import { cssNames } from "../../utils"; interface Props { item: CatalogEntityItem | null | undefined; @@ -57,8 +58,8 @@ export class CatalogEntityDetails extends Component {showDetails && ( -
-
+
+
extends Component item.onRun()} size={128} data-testid="detail-panel-hot-bar-icon" + className={styles.avatar} /> {item?.enabled && ( -
+
Click to open
)}
-
+
{item.name} @@ -114,7 +116,7 @@ export class CatalogEntityDetails extends Component