feat(core): adjust help island style (#6651)

This commit is contained in:
EYHN 2024-04-22 08:27:27 +00:00
parent ab7282213b
commit b7ade43c2e
No known key found for this signature in database
GPG Key ID: 46C9E26A75AB276C
2 changed files with 3 additions and 6 deletions

View File

@ -89,7 +89,7 @@ export const toolStyle = style({
position: 'absolute',
right: '30px',
bottom: '30px',
zIndex: cssVar('zIndexPopover'),
zIndex: 1,
display: 'flex',
flexDirection: 'column',
gap: '12px',

View File

@ -3,7 +3,6 @@ import { appSettingAtom, useLiveData, useService } from '@toeverything/infra';
import { useAtomValue } from 'jotai';
import { useCallback, useEffect, useState } from 'react';
import { appSidebarOpenAtom } from '../../../components/app-sidebar/index.jotai';
import { RightSidebarService } from '../services/right-sidebar';
import * as styles from './container.css';
import { Header } from './header';
@ -20,17 +19,15 @@ export const RightSidebarContainer = () => {
const frontView = useLiveData(rightSidebar.front$);
const open = useLiveData(rightSidebar.isOpen$) && frontView !== undefined;
const [floating, setFloating] = useState(false);
const appSidebarOpened = useAtomValue(appSidebarOpenAtom);
useEffect(() => {
const onResize = () =>
setFloating(!!(window.innerWidth < 1200 && appSidebarOpened));
const onResize = () => setFloating(!!(window.innerWidth < 768));
onResize();
window.addEventListener('resize', onResize);
return () => {
window.removeEventListener('resize', onResize);
};
}, [appSidebarOpened]);
}, []);
const handleOpenChange = useCallback(
(open: boolean) => {