Rename "CustomButton" to "FlexWrapButton"
This commit is contained in:
@@ -10,7 +10,7 @@ import type { ButtonProps } from '@mui/material/Button';
|
||||
import Button from '@mui/material/Button';
|
||||
import Stack from '@mui/material/Stack';
|
||||
|
||||
export const CustomButton = <C extends React.ElementType>({
|
||||
export const FlexWrapButton = <C extends React.ElementType>({
|
||||
children,
|
||||
...props
|
||||
}: ButtonProps<C, { component?: C }>) => (
|
||||
@@ -17,7 +17,7 @@ import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||
import { makeToast } from '@/base/utils/Toast.ts';
|
||||
import { TrackManga } from '@/features/tracker/components/TrackManga.tsx';
|
||||
import { Trackers } from '@/features/tracker/services/Trackers.ts';
|
||||
import { CustomButton } from '@/base/components/buttons/CustomButton.tsx';
|
||||
import { FlexWrapButton } from '@/base/components/buttons/FlexWrapButton.tsx';
|
||||
import type { GetTrackersSettingsQuery } from '@/lib/graphql/generated/graphql.ts';
|
||||
import { GET_TRACKERS_SETTINGS } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
||||
import type { MangaTitleInfo, MangaTrackRecordInfo } from '@/features/manga/Manga.types.ts';
|
||||
@@ -55,7 +55,7 @@ export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Mang
|
||||
<PopupState variant="dialog" popupId="manga-track-modal">
|
||||
{(popupState) => (
|
||||
<>
|
||||
<CustomButton
|
||||
<FlexWrapButton
|
||||
{...bindTrigger(popupState)}
|
||||
size={isMobileWidth ? 'small' : 'medium'}
|
||||
disabled={trackerList.loading || !!trackerList.error}
|
||||
@@ -69,7 +69,7 @@ export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Mang
|
||||
other: '# Tracker',
|
||||
})
|
||||
: t`Tracking`}
|
||||
</CustomButton>
|
||||
</FlexWrapButton>
|
||||
{popupState.isOpen && (
|
||||
<Dialog {...bindDialog(popupState)} maxWidth="md" fullWidth scroll="paper">
|
||||
<TrackManga manga={manga} />
|
||||
|
||||
@@ -23,7 +23,7 @@ import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||
import { makeToast } from '@/base/utils/Toast.ts';
|
||||
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
||||
import { SpinnerImage } from '@/base/components/SpinnerImage.tsx';
|
||||
import { CustomButton } from '@/base/components/buttons/CustomButton.tsx';
|
||||
import { FlexWrapButton } from '@/base/components/buttons/FlexWrapButton.tsx';
|
||||
import { TrackMangaButton } from '@/features/manga/components/TrackMangaButton.tsx';
|
||||
import { useManageMangaLibraryState } from '@/features/manga/hooks/useManageMangaLibraryState.tsx';
|
||||
import { Metadata as BaseMetadata } from '@/base/components/texts/Metadata.tsx';
|
||||
@@ -284,14 +284,14 @@ export const MangaDetails = ({
|
||||
</MetadataContainer>
|
||||
</ThumbnailMetadataWrapper>
|
||||
<MangaButtonsContainer>
|
||||
<CustomButton
|
||||
<FlexWrapButton
|
||||
size={MediaQuery.useIsMobileWidth() ? 'small' : 'medium'}
|
||||
onClick={updateLibraryState}
|
||||
variant={manga.inLibrary ? 'contained' : 'outlined'}
|
||||
>
|
||||
{manga.inLibrary ? <FavoriteIcon /> : <FavoriteBorderIcon />}
|
||||
{manga.inLibrary ? t`In Library` : t`Add To Library`}
|
||||
</CustomButton>
|
||||
</FlexWrapButton>
|
||||
<TrackMangaButton manga={manga} />
|
||||
<OpenSourceButton url={manga.realUrl} />
|
||||
</MangaButtonsContainer>
|
||||
|
||||
Reference in New Issue
Block a user