Skip to content

Commit

Permalink
fix: add display: 'swap' for fonts (shadcn-ui#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgknca authored Jan 27, 2023
1 parent f4b9344 commit 636c7af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/www/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ThemeProvider } from "@/components/theme-provider"
const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-sans",
display: 'swap',
})

interface RootLayoutProps {
Expand Down
2 changes: 2 additions & 0 deletions apps/www/components/fonts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import {
const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-sans",
display: 'swap',
})

const fontMono = FontMono({
subsets: ["latin"],
variable: "--font-mono",
display: 'swap',
})

export function Fonts() {
Expand Down
1 change: 1 addition & 0 deletions templates/next-template/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "@/styles/globals.css"
const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-sans",
display: 'swap',
})

export default function App({ Component, pageProps }: AppProps) {
Expand Down

0 comments on commit 636c7af

Please sign in to comment.