Package includes Ring Publishing theme for MUI components.
Theme was created with the assumption 1rem = 10px. Before using add below CSS to your project.
html {
font-size: 62.5%;
}- "@emotion/styled": "^11.0.0"
- "@mui/material": "^7.0.0"
- "@mui/x-data-grid": "^8.0.0"
- "@mui/x-data-grid-pro": "^8.0.0"
- "@mui/x-date-pickers": "^8.0.0"
- "@mui/x-date-pickers-pro": "^8.0.0"
npm install @ringpublishing/mui-themeimport { TablePagination } from '@mui/material';
import { ThemeConfig } from '@ringpublishing/mui-theme';
function App() {
return (
<ThemeConfig mode="light">
<TablePagination
count={2000}
rowsPerPage={10}
page={1}
component="div"
onPageChange={() => {
//
}}
/>
</ThemeConfig>
);
}Note: default language is 'enUS' and it works 'out of the box'. If you want to support other locales, follow example below.
PL locales for MUI core also are available. Just set language to 'plPL'.
import { TablePagination } from '@mui/material';
import { zhCN } from '@mui/material/locale';
import { plPL as xDataGridPl } from '@mui/x-data-grid/locales';
import { ThemeConfig } from '@ringpublishing/mui-theme';
function App() {
return (
<ThemeConfig mode="light" language="plPL" externalLocales={[xDataGridPl, zhCN]}>
<TablePagination
count={2000}
rowsPerPage={10}
page={1}
component="div"
onPageChange={() => {
//
}}
/>
</ThemeConfig>
);
}import { TablePagination } from '@mui/material';
import { ThemeConfig } from '@ringpublishing/mui-theme';
function App() {
const MuiDataGridPart = {
components: {
MuiDataGrid: {
styleOverrides: {
root: {
backgroundColor: 'red'
}
}
}
}
};
return (
<ThemeConfig mode="light" externalComponentsTheme={MuiDataGridPart}>
<TablePagination
count={2000}
rowsPerPage={10}
page={1}
component="div"
onPageChange={() => {
//
}}
/>
</ThemeConfig>
);
}