chen.lin
5 天以前 024504a3933e8f2f86e80383e61fa574524a0d28
rsf-admin/src/layout/AppBar.jsx
@@ -1,8 +1,8 @@
import * as React from 'react';
import { AppBar, TitlePortal } from 'react-admin';
import { AppBar } from 'react-admin';
import { Box, useMediaQuery } from '@mui/material';
import Logo from './Logo1';
import Logo from './Logo';
import { AppBarToolbar } from './AppBarToolbar';
const CustomAppBar = () => {
@@ -13,10 +13,27 @@
        <AppBar
            color="secondary"
            toolbar={<AppBarToolbar />}
            sx={{
                '& .RaAppBar-menuButton': {
                    display: 'none !important',
                },
                '& .RaAppBar-toolbar': {
                    paddingLeft: '4px !important',
                    justifyContent: 'flex-start',
                    gap: 2,
                }
            }}
        >
            <TitlePortal />
            {isLargeEnough && <Logo />}
            {isLargeEnough && <Box component="span" sx={{ flex: 1 }} />}
            {isLargeEnough && (
                <Box sx={{
                    display: 'flex',
                    alignItems: 'center',
                    minWidth: 'auto',
                }}>
                    <Logo />
                </Box>
            )}
            <Box component="span" sx={{ flex: 1 }} />
        </AppBar>
    );
};