File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import tailwindConfig from '@/tailwind.config';
2
2
3
3
const colors = tailwindConfig . theme . colors ;
4
4
export const themeConfig = {
5
+ typography : {
6
+ '--font-primary' : 'var(--font-open-sans)' ,
7
+ } ,
5
8
colors : {
6
9
light : {
7
10
'--text-color-primary' : colors . neutral [ 900 ] ,
Original file line number Diff line number Diff line change
1
+ import classNames from 'classnames' ;
1
2
import type { FC , PropsWithChildren } from 'react' ;
2
3
import { isValidElement } from 'react' ;
3
4
4
5
import styles from './index.module.css' ;
5
6
6
- type SkeletonProps = { hide ?: boolean ; loading ?: boolean } ;
7
+ type SkeletonProps = { hide ?: boolean ; loading ?: boolean ; className ?: string } ;
7
8
8
9
const Skeleton : FC < PropsWithChildren < SkeletonProps > > = ( {
9
10
children,
11
+ className,
10
12
hide = false ,
11
13
loading = true ,
12
14
} ) => {
@@ -26,7 +28,7 @@ const Skeleton: FC<PropsWithChildren<SkeletonProps>> = ({
26
28
< span
27
29
tabIndex = { - 1 }
28
30
aria-hidden = "true"
29
- className = { styles . skeleton }
31
+ className = { classNames ( styles . skeleton , className ) }
30
32
data-inline-skeleton = { isValidElement ( children ) ? undefined : true }
31
33
>
32
34
{ children }
Original file line number Diff line number Diff line change 86
86
dark:border-neutral-900;
87
87
}
88
88
89
+ span .searchButtonSkeleton {
90
+ @apply my-px
91
+ mr-2
92
+ flex-grow
93
+ rounded-xl;
94
+
95
+ & : empty {
96
+ @apply h-10;
97
+ }
98
+ }
99
+
89
100
.ghIconWrapper {
90
101
@apply size-9
91
102
rounded-md
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { useState } from 'react';
8
8
import type { FC , ComponentProps , HTMLAttributeAnchorTarget } from 'react' ;
9
9
10
10
import LanguageDropdown from '@/components/Common/LanguageDropDown' ;
11
+ import Skeleton from '@/components/Common/Skeleton' ;
11
12
import ThemeToggle from '@/components/Common/ThemeToggle' ;
12
13
import NavItem from '@/components/Containers/NavBar/NavItem' ;
13
14
import GitHub from '@/components/Icons/Social/GitHub' ;
@@ -19,6 +20,9 @@ import style from './index.module.css';
19
20
20
21
const SearchButton = dynamic ( ( ) => import ( '@/components/Common/Search' ) , {
21
22
ssr : false ,
23
+ loading : ( ) => (
24
+ < Skeleton className = { style . searchButtonSkeleton } loading = { true } />
25
+ ) ,
22
26
} ) ;
23
27
24
28
const navInteractionIcons = {
You can’t perform that action at this time.
0 commit comments