Skip to content

Commit 0dae82b

Browse files
committed
feat: Update font family for TableOfContent
1 parent 88301e8 commit 0dae82b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

components/TableOfContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ export default function TableOfContent({
6767
return (
6868
<aside
6969
className={$(
70-
'fixed top-[var(--page-top)] flex max-w-[220px] -translate-x-[230px] translate-y-[140px] flex-col',
70+
'fixed top-[var(--page-top)] flex max-w-[220px] -translate-x-[230px] translate-y-[140px] flex-col font-mono',
7171
'duration-750 transition-opacity lg:block lg:opacity-100',
7272
'md:hidden md:opacity-0',
7373
)}
7474
>
75-
<ul {...props} className={$('space-y-2.5 font-sans text-sm', className)}>
75+
<ul {...props} className={$('space-y-2.5 text-sm', className)}>
7676
{toc.map((section, i) => (
7777
<TOCItem key={i} section={section} currentSectionSlug={currentSectionSlug} />
7878
))}

tailwind.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import typography from '@tailwindcss/typography';
2+
import { fontFamily } from 'tailwindcss/defaultTheme';
23

34
/** @type {import('tailwindcss').Config} */
45
module.exports = {
56
content: ['./app/**/*.tsx', './components/**/*.tsx'],
67
darkMode: 'class',
78
theme: {
9+
fontFamily: {
10+
sans: ['var(--font-sans)', ...fontFamily.sans],
11+
mono: ['var(--font-mono)', ...fontFamily.mono],
12+
},
813
extend: {
914
colors: {
1015
neutral: {

0 commit comments

Comments
 (0)