Skip to content

Commit

Permalink
[DashboardLayout] Fix app bar items alignment (#4437)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap authored Nov 19, 2024
1 parent 840e8e1 commit 94f9652
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/create-toolpad-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function getPackageManager(): PackageManager {
}

// From https://github.com/vercel/next.js/blob/canary/packages/create-next-app/helpers/is-folder-empty.ts

async function isFolderEmpty(pathDir: string): Promise<boolean> {
const validFiles = [
'.DS_Store',
Expand Down
9 changes: 7 additions & 2 deletions packages/toolpad-core/src/DashboardLayout/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,12 @@ function DashboardLayout(props: DashboardLayoutProps) {
<Toolbar sx={{ backgroundColor: 'inherit', mx: { xs: -0.75, sm: -1.5 } }}>
<Stack
direction="row"
sx={{ flexWrap: 'wrap', justifyContent: 'space-between', width: '100%', py: 1.5 }}
justifyContent="space-between"
alignItems="center"
sx={{
flexWrap: 'wrap',
width: '100%',
}}
>
<Stack direction="row">
{!hideNavigation ? (
Expand Down Expand Up @@ -369,7 +374,7 @@ function DashboardLayout(props: DashboardLayoutProps) {
</Stack>
</Link>
</Stack>
<Stack direction="row" spacing={1} sx={{ marginLeft: 'auto' }}>
<Stack direction="row" alignItems="center" spacing={1} sx={{ marginLeft: 'auto' }}>
<ToolbarActionsSlot {...slotProps?.toolbarActions} />
<ToolbarAccountSlot {...slotProps?.toolbarAccount} />
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ThemeSwitcher } from './ThemeSwitcher';
*/
function ToolbarActions() {
return (
<Stack direction="row">
<Stack direction="row" alignItems="center">
<ThemeSwitcher />
</Stack>
);
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 94f9652

Please sign in to comment.