Skip to content

Commit

Permalink
v5.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed Dec 20, 2024
1 parent b99a854 commit a6435ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/charts",
"version": "5.5.2",
"version": "5.5.3",
"description": "Netdata frontend SDK and chart utilities",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
6 changes: 5 additions & 1 deletion src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Fragment } from "react"
import { Flex } from "@netdata/netdata-ui"
import { useAttributeValue, useIsMinimal } from "@/components/provider"
import Toolbox from "@/components/toolbox"
import FilterToolbox from "@/components/filterToolbox"
import Separator from "@/components/line/separator"
import { Title } from "@/components/title"

Expand All @@ -25,8 +26,10 @@ export const Container = props => {
)
}

const Header = () => {
const Header = ({ hasFilters }) => {
const isMinimal = useIsMinimal()
const leftHeaderElements = useAttributeValue("leftHeaderElements")
const focused = useAttributeValue("focused")

return (
<Container>
Expand All @@ -37,6 +40,7 @@ const Header = () => {
</Fragment>
))}
<Title />
{isMinimal && hasFilters && <FilterToolbox opacity={focused ? 1 : 0.7} />}
<Toolbox />
</Container>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export const Line = forwardRef(
{...rest}
{...(isMinimal && { border: 0 })}
>
{hasHeader && <Header />}
{hasFilters && <FilterToolbox opacity={focused ? 1 : 0.7} />}
{hasHeader && <Header hasFilters={hasFilters} />}
{!isMinimal && hasFilters && <FilterToolbox opacity={focused ? 1 : 0.7} />}
<ContentWrapper>
{showingInfo ? <Details /> : <ChartContentWrapper uiName={uiName} />}
</ContentWrapper>
Expand Down

0 comments on commit a6435ed

Please sign in to comment.