fix: calendar style issues (#6066)

This commit is contained in:
Kilu.He 2024-08-25 20:56:41 +08:00 committed by GitHub
parent 2a2dc903c1
commit 5b2df9e482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 5 deletions

View File

@ -47,7 +47,7 @@ function CollabView ({ doc }: CollabViewProps) {
return ( return (
<div style={style} <div style={style}
className={`relative w-full flex-1 ${isTemplateThumb ? 'flex justify-center' : ''} ${layoutClassName}`} className={`relative w-full ${isTemplateThumb ? 'flex justify-center h-full' : 'flex-1'} ${layoutClassName}`}
> >
<View <View
doc={doc} doc={doc}

View File

@ -47,7 +47,7 @@ function DatabaseView ({ viewMeta, ...props }: DatabaseProps) {
return ( return (
<div <div
style={{ style={{
minHeight: 'calc(100% - 48px)', minHeight: 'calc(100vh - 48px)',
maxWidth: isTemplateThumb ? '964px' : undefined, maxWidth: isTemplateThumb ? '964px' : undefined,
}} }}
className={'relative flex h-full w-full flex-col px-16 max-md:px-4'} className={'relative flex h-full w-full flex-col px-16 max-md:px-4'}

View File

@ -1,4 +1,3 @@
import { ViewLayout } from '@/application/collab.type';
import { usePublishContext } from '@/application/publish'; import { usePublishContext } from '@/application/publish';
import { EditorLayoutStyle } from '@/components/editor/EditorContext'; import { EditorLayoutStyle } from '@/components/editor/EditorContext';
import { ViewMetaCover } from '@/components/view-meta'; import { ViewMetaCover } from '@/components/view-meta';
@ -35,9 +34,8 @@ export function useViewMeta () {
return { return {
fontFamily: layoutStyle.font, fontFamily: layoutStyle.font,
fontSize: fontSizeMap[layoutStyle.fontLayout], fontSize: fontSizeMap[layoutStyle.fontLayout],
height: layout === ViewLayout.Document ? 'auto' : 'inherit',
}; };
}, [layoutStyle, layout]); }, [layoutStyle]);
const layoutClassName = useMemo(() => { const layoutClassName = useMemo(() => {
const classList = []; const classList = [];