Fix/manga screen prevent fab from overlaying last chapter in list (#298)

* Introduce "StyledFAb"

MUI "Fab" with the "default" styling applied

* Prevent FAB from overlaying last chapter in list of Manga details page
This commit is contained in:
schroda
2023-05-15 18:23:26 +02:00
committed by GitHub
parent 5aaf0854fe
commit 0a0d902bd2
5 changed files with 51 additions and 24 deletions

View File

@@ -0,0 +1,17 @@
import { Fab } from '@mui/material';
import { styled } from '@mui/system';
export const DEFAULT_FAB_STYLE = {
position: 'fixed',
height: '48px',
right: '3em',
bottom: '2em',
} as const;
export const DEFAULT_FULL_FAB_HEIGHT = `calc(${DEFAULT_FAB_STYLE.bottom} + ${DEFAULT_FAB_STYLE.height})`;
const StyledFab = styled(Fab)({
...DEFAULT_FAB_STYLE,
}) as typeof Fab;
export default StyledFab;