diff --git a/packages/@ourworldindata/grapher/src/core/grapher.scss b/packages/@ourworldindata/grapher/src/core/grapher.scss index c5a6df63c90..e348f1d2f72 100644 --- a/packages/@ourworldindata/grapher/src/core/grapher.scss +++ b/packages/@ourworldindata/grapher/src/core/grapher.scss @@ -72,7 +72,7 @@ $zindex-controls-drawer: 140; @import "../loadingIndicator/LoadingIndicator.scss"; @import "../footer/Footer.scss"; @import "../header/Header.scss"; - @import "../keyDataTable/KeyDataTable.scss"; + @import "../modal/SourcesKeyDataTable.scss"; } // These rules are currently used elsewhere in the site. e.g. Explorers diff --git a/packages/@ourworldindata/grapher/src/keyDataTable/KeyDataTable.scss b/packages/@ourworldindata/grapher/src/modal/SourcesKeyDataTable.scss similarity index 80% rename from packages/@ourworldindata/grapher/src/keyDataTable/KeyDataTable.scss rename to packages/@ourworldindata/grapher/src/modal/SourcesKeyDataTable.scss index 3b70397e53d..43ae8d1020d 100644 --- a/packages/@ourworldindata/grapher/src/keyDataTable/KeyDataTable.scss +++ b/packages/@ourworldindata/grapher/src/modal/SourcesKeyDataTable.scss @@ -1,4 +1,4 @@ -.key-data-table { +.sources-key-data-table { $border: #e7e7e7; @include label-2-medium; @@ -15,7 +15,7 @@ display: grid; grid-template-columns: repeat(2, 1fr); - .key-data-table-item { + .key-data { display: flex; padding: 16px 24px 16px 0; @@ -23,12 +23,12 @@ display: block; } - &:not(.key-data-table-source) { + &:not(.key-data-source) { border-top: 1px solid $border; } &__title { - flex: 0 0 130px; // using a fixed width here to make sure the content is aligned + flex: 0 0 140px; // using a fixed width here to make sure the content is aligned margin-right: 24px; color: $light-text; @@ -52,8 +52,8 @@ } } -&.GrapherComponentNarrow .key-data-table { - .indicator-key-data-item { +&.GrapherComponentNarrow .sources-key-data-table { + .key-data { display: block; } } diff --git a/packages/@ourworldindata/grapher/src/keyDataTable/KeyDataTable.tsx b/packages/@ourworldindata/grapher/src/modal/SourcesKeyDataTable.tsx similarity index 54% rename from packages/@ourworldindata/grapher/src/keyDataTable/KeyDataTable.tsx rename to packages/@ourworldindata/grapher/src/modal/SourcesKeyDataTable.tsx index a4cfde309e2..f41d385d14c 100644 --- a/packages/@ourworldindata/grapher/src/keyDataTable/KeyDataTable.tsx +++ b/packages/@ourworldindata/grapher/src/modal/SourcesKeyDataTable.tsx @@ -11,7 +11,7 @@ import { makeLinks, } from "@ourworldindata/components" -interface KeyDataTableProps { +interface SourcesKeyDataTableProps { attribution?: string dateRange?: string lastUpdated?: string @@ -27,7 +27,7 @@ interface KeyDataTableProps { hideBottomBorder?: boolean } -export const KeyDataTable = (props: KeyDataTableProps) => { +export const SourcesKeyDataTable = (props: SourcesKeyDataTableProps) => { const source = makeSource(props) const lastUpdated = makeLastUpdated(props) const nextUpdate = makeNextUpdate(props) @@ -38,100 +38,91 @@ export const KeyDataTable = (props: KeyDataTableProps) => { return (
{this.def.descriptionShort}
)} -