Fix/manga details buttons (#677)
* Move button icon on top of text on small screens * Fix colors of buttons In case a manga is in the library all buttons were colored blue instead of only the library button. Use white as default color since buttons can also be disabled and with a grey default color it's not easy to tell if the button is disabled or not * Remove wrapping "button" inside "a" tag
This commit is contained in:
20
src/components/atoms/CustomIconButton.tsx
Normal file
20
src/components/atoms/CustomIconButton.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { Button, ButtonProps, Stack, TypographyProps } from '@mui/material';
|
||||
|
||||
export const CustomIconButton = <C extends React.ElementType>({
|
||||
children,
|
||||
...props
|
||||
}: ButtonProps & TypographyProps<C, { component?: C }>) => (
|
||||
<Button {...props}>
|
||||
<Stack direction="row" alignItems="center" justifyContent="center" gap="10px" flexWrap="wrap">
|
||||
{children}
|
||||
</Stack>
|
||||
</Button>
|
||||
);
|
||||
Reference in New Issue
Block a user