diff --git a/src/components/ui-dimensions/InfoPanel/index.js b/src/components/ui-dimensions/InfoPanel/index.js index 6825d1b..e408302 100644 --- a/src/components/ui-dimensions/InfoPanel/index.js +++ b/src/components/ui-dimensions/InfoPanel/index.js @@ -186,7 +186,7 @@ const InfoPanel = observer(() => { <> {(showInfoContent() || showDescriptionContent()) && ( - + {showDescriptionContent() && ( diff --git a/src/components/ui-dimensions/InfoPanel/styles.js b/src/components/ui-dimensions/InfoPanel/styles.js index 9d462b7..55dcd5c 100644 --- a/src/components/ui-dimensions/InfoPanel/styles.js +++ b/src/components/ui-dimensions/InfoPanel/styles.js @@ -13,7 +13,7 @@ export const shifted = css` label: shifted; `; -export const infoPanel = css` +export const infoPanel = (uiStyle) => css` label: info-panel; visibility: hidden; position: absolute; @@ -55,6 +55,12 @@ export const infoPanel = css` min-width: 100px; } } + color: inherit; + } + + a { + text-decoration: none; + color: ${uiStyle.palette_primary_main_color}; } `; diff --git a/src/components/ui-zeta-alpha/InfoPanel/index.js b/src/components/ui-zeta-alpha/InfoPanel/index.js index 6825d1b..e408302 100644 --- a/src/components/ui-zeta-alpha/InfoPanel/index.js +++ b/src/components/ui-zeta-alpha/InfoPanel/index.js @@ -186,7 +186,7 @@ const InfoPanel = observer(() => { <> {(showInfoContent() || showDescriptionContent()) && ( - + {showDescriptionContent() && ( diff --git a/src/components/ui-zeta-alpha/InfoPanel/styles.js b/src/components/ui-zeta-alpha/InfoPanel/styles.js index 582f698..0687e1b 100644 --- a/src/components/ui-zeta-alpha/InfoPanel/styles.js +++ b/src/components/ui-zeta-alpha/InfoPanel/styles.js @@ -13,7 +13,7 @@ export const shifted = css` label: shifted; `; -export const infoPanel = css` +export const infoPanel = (uiStyle) => css` label: info-panel; visibility: hidden; position: absolute; @@ -55,6 +55,12 @@ export const infoPanel = css` min-width: 100px; } } + color: inherit; + } + + a { + text-decoration: none; + color: ${uiStyle.palette_primary_main_color}; } `; diff --git a/src/components/ui/InfoPanel/index.js b/src/components/ui/InfoPanel/index.js index 7486b33..9564f80 100644 --- a/src/components/ui/InfoPanel/index.js +++ b/src/components/ui/InfoPanel/index.js @@ -159,6 +159,36 @@ const InfoPanel = observer(() => { ); }; + const getNetworkInfo = () => ( + <> + + {Boolean(visualizationStore.links.length) + && ( + <> + + + {uiStore.componentWidth > 800 + && ( + <> + + + + ) + } + + ) + } + {visualizationStore.clusters && uiStore.colorIndex === 0 + && ( + <> + + + + ) + } + + ); + const showInfoContent = () => configStore.uiConfig.information_panel; const showDescriptionContent = () => isOpen @@ -180,12 +210,14 @@ const InfoPanel = observer(() => { <> {(showInfoContent() || showDescriptionContent()) && ( - - {showDescriptionContent() && ( - - - - )} + + {showDescriptionContent() + && ( + + + + ) + } {showDescriptionContent() && ( <> @@ -201,37 +233,12 @@ const InfoPanel = observer(() => { ) } {showInfoContent() - && (visualizationStore.hoveredItem || visualizationStore.hoveredLink || visualizationStore.clickedItem || visualizationStore.clickedLink - ? getItemOrLinkInfo() - : ( - <> - - {Boolean(visualizationStore.links.length) - && ( - <> - - - {uiStore.componentWidth > 800 - && ( - <> - - - - ) - } - - ) - } - {visualizationStore.clusters && uiStore.colorIndex === 0 - && ( - <> - - - - ) - } - - ) + && ( + + {visualizationStore.hoveredItem || visualizationStore.hoveredLink || visualizationStore.clickedItem || visualizationStore.clickedLink + ? getItemOrLinkInfo() + : getNetworkInfo()} + ) } diff --git a/src/components/ui/InfoPanel/styles.js b/src/components/ui/InfoPanel/styles.js index c9b94ee..147a919 100644 --- a/src/components/ui/InfoPanel/styles.js +++ b/src/components/ui/InfoPanel/styles.js @@ -13,7 +13,7 @@ export const shifted = css` label: shifted; `; -export const infoPanel = css` +export const infoPanel = (uiStyle) => css` label: info-panel; visibility: hidden; position: absolute; @@ -55,6 +55,12 @@ export const infoPanel = css` min-width: 100px; } } + color: inherit; + } + + a { + text-decoration: none; + color: ${uiStyle.palette_primary_main_color}; } `; @@ -72,10 +78,16 @@ export const divider = css` color: rgba(148, 148, 147, 0.8) !important; `; +export const info = css` + label: info; + display: flex; + font-size: 0.75rem !important; +`; + export const infoItem = css` label: info-item; display: inline !important; - padding: 4px 4px; + padding: 0px 4px; `; export const closeButton = css`