Skip to content

Commit

Permalink
Add types for new styling module
Browse files Browse the repository at this point in the history
  • Loading branch information
davenquinn committed Jun 11, 2024
1 parent b2c9dd0 commit e4ecb66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/declaration.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// declaration.d.ts

import type { Hyper } from "@macrostrat/hyper";

// Union of hyper and record
type StyledHyper = Hyper & Record<string, string>;

// Style modules
declare module "*.module.styl" {
const classes: { [key: string]: string };
Expand All @@ -11,7 +16,7 @@ declare module "*.styl" {
export default content;
}

// Style modules
// Override declarations for sass module
declare module "*.module.sass" {
const classes: { [key: string]: string };
export default classes;
Expand Down
3 changes: 1 addition & 2 deletions src/pages/map/map-interface/map-page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
useContextPanelOpen,
} from "../app-state";
import Searchbar from "../components/navbar";
import styles from "./main.module.styl";
import MapContainer from "./map-view";
import { MenuPage } from "./menu";
import { info } from "console";
Expand All @@ -25,7 +24,7 @@ const ElevationChart = loadable(() => import("../components/elevation-chart"));
const InfoDrawer = loadable(() => import("../components/info-drawer"));
const Menu = loadable(() => import("./menu"));

const h = hyper.styled(styles);
import h from "./main.module.styl";

function MapView(props) {
return h(
Expand Down

0 comments on commit e4ecb66

Please sign in to comment.