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:
17
src/components/util/StyledFab.tsx
Normal file
17
src/components/util/StyledFab.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user