fix: make sidebar content respects safe-area-inset-bottom (#251)
This commit is contained in:
@@ -6,6 +6,7 @@ import { useBookDataStore } from '@/store/bookDataStore';
|
||||
import TOCView from './TOCView';
|
||||
import BooknoteView from './BooknoteView';
|
||||
import TabNavigation from './TabNavigation';
|
||||
import { isPWA } from '@/services/environment';
|
||||
|
||||
const SidebarContent: React.FC<{
|
||||
bookDoc: BookDoc;
|
||||
@@ -90,7 +91,9 @@ const SidebarContent: React.FC<{
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex-shrink-0'>
|
||||
<div
|
||||
className={clsx('flex-shrink-0', isPWA() ? 'pb-[calc(env(safe-area-inset-bottom)/2)]' : '')}
|
||||
>
|
||||
<TabNavigation activeTab={activeTab} onTabChange={handleTabChange} />
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -3,7 +3,6 @@ import React from 'react';
|
||||
import { MdToc, MdEditNote, MdBookmarkBorder } from 'react-icons/md';
|
||||
|
||||
import { useTranslation } from '@/hooks/useTranslation';
|
||||
import { isPWA } from '@/services/environment';
|
||||
|
||||
const TabNavigation: React.FC<{
|
||||
activeTab: string;
|
||||
@@ -15,10 +14,7 @@ const TabNavigation: React.FC<{
|
||||
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
'bottom-tab border-base-300/50 bg-base-200 relative flex w-full border-t',
|
||||
isPWA() ? 'bottom-[calc(env(safe-area-inset-bottom)_/_2)]' : '',
|
||||
)}
|
||||
className={clsx('bottom-tab border-base-300/50 bg-base-200 relative flex w-full border-t')}
|
||||
>
|
||||
<div
|
||||
className={clsx(
|
||||
|
||||
Reference in New Issue
Block a user