Skip to content

Commit

Permalink
Merge pull request #8170 from herndlm/fix-layout-examples
Browse files Browse the repository at this point in the history
Add missing props in docs layout examples
  • Loading branch information
WiXSL authored Sep 15, 2022
2 parents d267819 + d98d041 commit 7cb689c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const MyUserMenu = () => <UserMenu><MyLogoutButton /></UserMenu>;

const MyAppBar = () => <AppBar userMenu={<MyUserMenu />} />;

const MyLayout = () => <Layout appBar={MyAppBar} />;
const MyLayout = (props) => <Layout {...props} appBar={MyAppBar} />;

const App = () => (
<Admin layout={MyLayout}>
Expand Down
2 changes: 1 addition & 1 deletion docs/Theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ const MyUserMenu = () => <UserMenu><MyLogoutButton /></UserMenu>;

const MyAppBar = () => <AppBar userMenu={<MyUserMenu />} />;

const MyLayout = () => <Layout appBar={MyAppBar} />;
const MyLayout = (props) => <Layout {...props} appBar={MyAppBar} />;

const App = () => (
<Admin layout={MyLayout}>
Expand Down
2 changes: 1 addition & 1 deletion docs/Upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -2924,7 +2924,7 @@ const MyCustomLogout = () => <Logout className="my-class-name" />;

+ const MyAppBar = () => <AppBar userMenu={<MyUserMenu />} />;

+ const MyLayout = () => <Layout appBar={MyAppBar} />;
+ const MyLayout = (props) => <Layout {...props} appBar={MyAppBar} />;

const MyAdmin = () => (
<Admin
Expand Down
4 changes: 2 additions & 2 deletions docs/useLogout.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const MyAppBar = () => (
<AppBar userMenu={<UserMenu />} />
);

const MyLayout = () => (
<Layout appBar={MyAppBar} />
const MyLayout = (props) => (
<Layout {...props} appBar={MyAppBar} />
);

export default MyLayout;
Expand Down

0 comments on commit 7cb689c

Please sign in to comment.