如何删除react-admin中的AppBar?

问题描述 投票:0回答:1

我使用主题删除了菜单。

components: {
    ...defaultTheme.components,
    RaSidebar: {
        styleOverrides: {
        root: {
           width: 0,
        }
       }
    }
}

我想彻底删除appBar。但我找不到与 appBar 相关的类名。有人可以帮助我吗?

我尝试用各种方法来做到这一点。

export const MyLayout = (props: any) => <Layout {...props} menu={Mymenu} appBar={null} appBarAlwaysOn/>;

没成功

  1. 应用栏样式
const appBarStyle = {
      minHeight: 0,
    visibility: 'hidden',
    overflow: 'hidden',
    position: 'fixed',
    top: '0',
    left: '0',
    right: '0',
    zIndex: '-1',
    };
  
    return <AppBar  sx={appBarStyle} />;

没成功

react-admin
1个回答
0
投票

试试这个:

const MyAppBar = (props: any) => (<></>)

export const MyLayout = (props: any) => <Layout {...props} menu={Mymenu} appBar={MyAppBar} />
© www.soinside.com 2019 - 2024. All rights reserved.