diff --git a/packages/toolpad-core/src/DashboardLayout/ToolpadLogo.tsx b/packages/toolpad-core/src/DashboardLayout/ToolpadLogo.tsx new file mode 100644 index 00000000000..f5ed7d6a1d8 --- /dev/null +++ b/packages/toolpad-core/src/DashboardLayout/ToolpadLogo.tsx @@ -0,0 +1,55 @@ +import * as React from 'react'; + +export default function ToolpadLogo({ size = 40 }: { size?: number }) { + return ( + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/packages/toolpad-core/src/index.ts b/packages/toolpad-core/src/index.ts index f71afdb4dcf..6f9654e4003 100644 --- a/packages/toolpad-core/src/index.ts +++ b/packages/toolpad-core/src/index.ts @@ -2,3 +2,5 @@ export { AppProvider } from './AppProvider'; export type { Branding, Navigation } from './AppProvider'; export { DashboardLayout } from './DashboardLayout'; + +export * from './themes'; diff --git a/playground/toolpad-core-nextjs/src/app/theme.ts b/playground/toolpad-core-nextjs/src/app/theme.ts new file mode 100644 index 00000000000..b406670651b --- /dev/null +++ b/playground/toolpad-core-nextjs/src/app/theme.ts @@ -0,0 +1,116 @@ +'use client'; + +import { createTheme } from '@mui/material/styles'; + +const baseTheme = createTheme(); + +const theme = createTheme(baseTheme, { + palette: { + background: { + default: baseTheme.palette.grey['50'], + }, + }, + typography: { + h6: { + fontWeight: '700', + }, + }, + components: { + MuiAppBar: { + styleOverrides: { + root: { + borderWidth: 0, + borderBottomWidth: 1, + borderStyle: 'solid', + borderColor: baseTheme.palette.divider, + boxShadow: 'none', + }, + }, + }, + MuiList: { + styleOverrides: { + root: { + padding: 0, + }, + }, + }, + MuiIconButton: { + styleOverrides: { + root: { + color: baseTheme.palette.primary.dark, + padding: 8, + }, + }, + }, + MuiListSubheader: { + styleOverrides: { + root: { + color: baseTheme.palette.grey['600'], + fontSize: 12, + fontWeight: '700', + height: 40, + paddingLeft: 32, + }, + }, + }, + MuiListItem: { + styleOverrides: { + root: { + paddingTop: 0, + paddingBottom: 0, + }, + }, + }, + MuiListItemButton: { + styleOverrides: { + root: { + borderRadius: 8, + '&.Mui-selected': { + '& .MuiListItemIcon-root': { + color: baseTheme.palette.primary.dark, + }, + '& .MuiTypography-root': { + color: baseTheme.palette.primary.dark, + }, + '& .MuiSvgIcon-root': { + color: baseTheme.palette.primary.dark, + }, + '& .MuiTouchRipple-child': { + backgroundColor: baseTheme.palette.primary.dark, + }, + }, + '& .MuiSvgIcon-root': { + color: baseTheme.palette.action.active, + }, + }, + }, + }, + MuiListItemText: { + styleOverrides: { + root: { + '& .MuiTypography-root': { + fontWeight: '500', + }, + }, + }, + }, + MuiListItemIcon: { + styleOverrides: { + root: { + minWidth: 34, + }, + }, + }, + MuiDivider: { + styleOverrides: { + root: { + borderBottomWidth: 2, + marginLeft: '16px', + marginRight: '16px', + }, + }, + }, + }, +}); + +export default theme;