Skip to content

Commit

Permalink
Fix font in dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
albingroen committed Mar 19, 2023
1 parent 5154054 commit cbea161
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { HeroIcon } from "../lib/types";
import { ChevronRightIcon } from "@heroicons/react/20/solid";
import classNames from "../lib/classNames";
import { inter } from "../lib/font";

type DropdownItem = {
onClick?: () => void;
Expand Down Expand Up @@ -45,7 +46,8 @@ const itemStyles = (disabled?: boolean, isSubMenuTrigger?: boolean) =>
classNames(
"group py-2 px-2.5 rounded-md flex items-center justify-between gap-2 text-left w-full text-sm disabled:opacity-50 transition duration-75 dropdown-menu-item",
isSubMenuTrigger && "cursor-default dropdown-menu-subtrigger",
disabled && "opacity-40 cursor-default"
disabled && "opacity-40 cursor-default",
inter.className
);

const contentStyles =
Expand Down
6 changes: 6 additions & 0 deletions lib/font.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Inter } from "@next/font/google";

export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
});
7 changes: 1 addition & 6 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ import WelcomeModal from "../components/WelcomeModal";
import axios from "axios";
import splitbee from "@splitbee/web";
import type { AppProps } from "next/app";
import { Inter } from "@next/font/google";
import { SchemaContext } from "../lib/context";
import { Toaster } from "react-hot-toast";
import { classNames } from "react-cmdk";
import { useEffect, useState } from "react";
import { useRouter } from "next/dist/client/router";

export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
});
import { inter } from "../lib/font";

splitbee.init();

Expand Down

1 comment on commit cbea161

@vercel
Copy link

@vercel vercel bot commented on cbea161 Mar 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.