Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit 9a46b9f

Browse files
committed
svgIcon を mui から直接
1 parent 4cd6a34 commit 9a46b9f

6 files changed

Lines changed: 14 additions & 29 deletions

File tree

workspaces/app/src/features/icons/components/SvgIcon.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

workspaces/app/src/features/ranking/components/RankingCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { NavigateNext } from '@mui/icons-material';
12
import { Suspense } from 'react';
23
import styled from 'styled-components';
34

4-
import { SvgIcon } from '../../../features/icons/components/SvgIcon';
55
import { Box } from '../../../foundation/components/Box';
66
import { Flex } from '../../../foundation/components/Flex';
77
import { Image } from '../../../foundation/components/Image';
@@ -92,7 +92,7 @@ const RankingCard: React.FC<Props> = ({ bookId }) => {
9292
<Text color={Color.Secondary} typography={Typography.NORMAL14} weight="bold">
9393
この漫画を読む
9494
</Text>
95-
<SvgIcon color={Color.Secondary} height={32} type="NavigateNext" width={32} />
95+
<NavigateNext style={{ color: Color.Secondary, height: 32, width: 32 }} />
9696
</Flex>
9797
</Box>
9898
</Flex>

workspaces/app/src/foundation/components/Dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { Close } from '@mui/icons-material';
12
import { useAtom } from 'jotai';
23
import styled from 'styled-components';
34

4-
import { SvgIcon } from '../../features/icons/components/SvgIcon';
55
import { DialogContentAtom } from '../atoms/DialogContentAtom';
66
import { Color, Space } from '../styles/variables';
77

@@ -51,7 +51,7 @@ export const Dialog: React.FC = () => {
5151
<_Overlay>
5252
<_Wrapper>
5353
<_CloseButton onClick={() => updateContent(null)}>
54-
<SvgIcon color={Color.MONO_A} height={32} type="Close" width={32} />
54+
<Close style={{ color: Color.MONO_A, height: 32, width: 32 }} />
5555
</_CloseButton>
5656
<_Container>{content}</_Container>
5757
</_Wrapper>

workspaces/app/src/pages/BookDetailPage/internal/FavButton.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { Favorite, FavoriteBorder } from '@mui/icons-material';
12
import styled from 'styled-components';
23

3-
import { SvgIcon } from '../../../features/icons/components/SvgIcon';
44
import { Color, Space } from '../../../foundation/styles/variables';
55

66
const _Button = styled.button<{ $outlined: boolean }>`
@@ -28,12 +28,11 @@ export const FavButton: React.FC<Props> = ({ enabled, onClick }) => {
2828
aria-label={enabled ? 'お気に入りを解除する' : 'お気に入りに追加する'}
2929
onClick={onClick}
3030
>
31-
<SvgIcon
32-
color={enabled ? Color.Favorite : Color.MONO_40}
33-
height={24}
34-
type={enabled ? 'Favorite' : 'FavoriteBorder'}
35-
width={24}
36-
/>
31+
{enabled ? (
32+
<Favorite style={{ color: Color.Favorite, height: 24, width: 24 }} />
33+
) : (
34+
<FavoriteBorder style={{ color: Color.MONO_40, height: 24, width: 24 }} />
35+
)}
3736
</_Button>
3837
);
3938
};

workspaces/app/src/pages/TopPage/internal/CoverSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { Search } from '@mui/icons-material';
12
import styled from 'styled-components';
23

3-
import { SvgIcon } from '../../../features/icons/components/SvgIcon';
44
import { Link } from '../../../foundation/components/Link';
55
import { Text } from '../../../foundation/components/Text';
66
import { Color, Radius, Space, Typography } from '../../../foundation/styles/variables';
@@ -34,7 +34,7 @@ export const CoverSection: React.FC = () => {
3434
<_Wrapper>
3535
<HeroImage />
3636
<_SearchLink href="/search">
37-
<SvgIcon color={Color.MONO_A} height={24} type="Search" width={24} />
37+
<Search style={{ color: Color.MONO_A, height: 24, width: 24 }} />
3838
<Text color={Color.MONO_A} typography={Typography.NORMAL16}>
3939
検索
4040
</Text>

workspaces/app/src/routes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { ArrowBack } from '@mui/icons-material';
12
import React from 'react';
23
import { Route, Routes } from 'react-router-dom';
34
import { styled } from 'styled-components';
45

5-
import { SvgIcon } from './features/icons/components/SvgIcon';
66
import { Link } from './foundation/components/Link';
77
import { Text } from './foundation/components/Text';
88
import { ActionLayout } from './foundation/layouts/ActionLayout';
@@ -34,7 +34,7 @@ export const Router: React.FC = () => {
3434
<ActionLayout
3535
leftContent={
3636
<_BackToTopButton href={'/'}>
37-
<SvgIcon color={Color.MONO_100} height={32} type="ArrowBack" width={32} />
37+
<ArrowBack style={{ color: Color.MONO_100, height: 32, width: 32 }} />
3838
<Text color={Color.MONO_100} typography={Typography.NORMAL16} weight="bold">
3939
トップへ戻る
4040
</Text>

0 commit comments

Comments
 (0)