File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { LanguageKey } from 'src/data/languages/types';
1212import { useLayoutContext } from 'src/contexts/layout-context' ;
1313import { navigate } from '../Link' ;
1414import { LANGUAGE_SELECTOR_HEIGHT , INKEEP_ASK_BUTTON_HEIGHT } from './utils/heights' ;
15+ import { Skeleton } from '../ui/Skeleton' ;
1516
1617type LanguageSelectorOptionData = {
1718 label : LanguageKey ;
@@ -60,7 +61,7 @@ export const LanguageSelector = () => {
6061 } ;
6162
6263 if ( ! selectedOption ) {
63- return null ;
64+ return < Skeleton className = "w-[180px] h-5 my-[9px]" /> ;
6465 }
6566
6667 const selectedLang = languageInfo [ selectedOption . label ] ;
Original file line number Diff line number Diff line change 1+ import cn from '@ably/ui/core/utils/cn' ;
2+
3+ function Skeleton ( { className, ...props } : React . ComponentProps < 'div' > ) {
4+ return (
5+ < div
6+ data-slot = "skeleton"
7+ className = { cn ( 'bg-neutral-200 dark:bg-neutral-1100 animate-pulse rounded-md' , className ) }
8+ { ...props }
9+ />
10+ ) ;
11+ }
12+
13+ export { Skeleton } ;
You can’t perform that action at this time.
0 commit comments