Files
suwayomi-material-you-webui/src/components/atoms/CustomIconButton.tsx
schroda 1b81e1e824 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
2024-03-29 00:15:03 +01:00

21 lines
682 B
TypeScript

/*
* 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>
);