Skip to content
Snippets Groups Projects
Unverified Commit 2a48f4f6 authored by Jesse Devaney's avatar Jesse Devaney Committed by GitHub
Browse files

fix dashboard header fixed width adjustment bug (#38880)

parent affed154
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,10 @@ export function DashboardHeaderComponent({
<span>{editWarning}</span>
</EditWarning>
)}
<HeaderContainer isSidebarOpen={isSidebarOpen}>
<HeaderContainer
isFixedWidth={dashboard?.width === "fixed"}
isSidebarOpen={isSidebarOpen}
>
<HeaderRow
className={cx("QueryBuilder-section", headerClassName)}
data-testid="dashboard-header"
......
......@@ -40,8 +40,12 @@ export const HeaderFixedWidthContainer = styled(
}
`;
export const HeaderContainer = styled.div<{ isSidebarOpen: boolean }>`
export const HeaderContainer = styled.div<{
isSidebarOpen: boolean;
isFixedWidth: boolean;
}>`
${props =>
props.isFixedWidth &&
props.isSidebarOpen &&
css`
margin-right: ${SIDEBAR_WIDTH}px;
......
......@@ -8,6 +8,7 @@ import FormField from "metabase/core/components/FormField/FormField";
import { SIDEBAR_WIDTH } from "../Sidebar";
export const DashboardInfoSidebarRoot = styled.aside`
width: ${SIDEBAR_WIDTH}px;
min-width: ${SIDEBAR_WIDTH}px;
padding: 0 2rem 0.5rem;
background: ${color("white")};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment