-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 (grapher) refactor modals and entity selector
- Loading branch information
1 parent
0deb912
commit e68c6a0
Showing
23 changed files
with
413 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/@ourworldindata/grapher/src/core/OverlayHeader.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.overlay-header { | ||
--padding: var(--modal-padding, 16px); | ||
|
||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: var(--padding) var(--padding) 16px; | ||
|
||
button { | ||
margin-left: 8px; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/@ourworldindata/grapher/src/core/OverlayHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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={cx("overlay-header", className)}> | ||
<h2 className="grapher_h5-black-caps grapher_light">{title}</h2> | ||
{onDismiss && <CloseButton onClick={onDismiss} />} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.