Skip to content

Commit

Permalink
🐝 trigger staging
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Apr 15, 2024
1 parent 1cc8338 commit 433b335
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ nav.controlsRow .chart-controls .settings-menu {
// chart-type label
//
.settings-menu-header {
display: flex;
justify-content: space-between;
align-items: center;
background: white;
padding: 9px $indent 3px $indent;
position: sticky;
Expand Down
12 changes: 6 additions & 6 deletions packages/@ourworldindata/grapher/src/controls/SettingsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
TableFilterToggle,
TableFilterToggleManager,
} from "./settings/TableFilterToggle"
import { OverlayHeader } from "../core/OverlayHeader"

const {
LineChart,
Expand Down Expand Up @@ -315,12 +316,11 @@ export class SettingsMenu extends React.Component<{
...this.layout,
}}
>
<div className="settings-menu-header">
<div className="grapher_h5-black-caps grapher_light">
{menuTitle}
</div>
<CloseButton onClick={() => this.toggleVisibility()} />
</div>
<OverlayHeader
className="settings-menu-header"
title={menuTitle}
onDismiss={this.toggleVisibility}
/>

<div className="settings-menu-controls">
<SettingsGroup
Expand Down
5 changes: 4 additions & 1 deletion packages/@ourworldindata/grapher/src/core/OverlayHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import React from "react"
import cx from "classnames"
import { CloseButton } from "../closeButton/CloseButton.js"

export function OverlayHeader({
title,
onDismiss,
className,
}: {
title: string
onDismiss?: () => void
className?: string
}): JSX.Element {
return (
<div className="overlay-header">
<div className={cx("overlay-header", className)}>
<h2 className="grapher_h5-black-caps grapher_light">{title}</h2>
{onDismiss && <CloseButton onClick={onDismiss} />}
</div>
Expand Down

0 comments on commit 433b335

Please sign in to comment.