-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
147 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
|
||
import { IconButton, styled } from '@mui/material'; | ||
import { Star } from '@mui/icons-material'; | ||
|
||
const Icon = styled(Star)<{ active: boolean }>` | ||
color: ${({ theme, active }) => | ||
active ? theme.palette.favorite.main : theme.palette.action.active}; | ||
`; | ||
|
||
type Props = { | ||
active?: boolean; | ||
count: number; | ||
}; | ||
|
||
export default function FavoriteButton({ active = false, count }: Props) { | ||
return ( | ||
<div aria-label={`${count}件のお気に入り。お気に入りに追加する`}> | ||
<IconButton | ||
color="favorite" | ||
aria-label="お気に入りに追加" | ||
onClick={(event) => event.stopPropagation()} | ||
> | ||
<Icon active={active} /> | ||
</IconButton> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
|
||
import { IconButton, styled } from '@mui/material'; | ||
import { Sync } from '@mui/icons-material'; | ||
|
||
const Icon = styled(Sync)<{ active: boolean }>` | ||
color: ${({ theme, active }) => | ||
active ? theme.palette.repost.main : theme.palette.action.active}; | ||
`; | ||
|
||
type Props = { | ||
active?: boolean; | ||
count: number; | ||
}; | ||
|
||
export default function RePostButton({ active = false, count }: Props) { | ||
return ( | ||
<div aria-label={`${count}件のリポスト。リポストする`}> | ||
<IconButton | ||
color="repost" | ||
aria-label="リポスト" | ||
onClick={(event) => event.stopPropagation()} | ||
> | ||
<Icon active={active} /> | ||
</IconButton> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use client'; | ||
|
||
import { IconButton } from '@mui/material'; | ||
import { ChatBubbleOutline } from '@mui/icons-material'; | ||
|
||
type Props = { | ||
count: number; | ||
}; | ||
export default function ReplyButton({ count }: Props) { | ||
return ( | ||
<div aria-label={`${count}件の返信。返信する`}> | ||
<IconButton | ||
color="more" | ||
aria-label="リプライ" | ||
onClick={(event) => event.stopPropagation()} | ||
> | ||
<ChatBubbleOutline /> | ||
</IconButton> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use client'; | ||
|
||
import { IconButton } from '@mui/material'; | ||
import { IosShare } from '@mui/icons-material'; | ||
|
||
export default function ShareButton() { | ||
return ( | ||
<div aria-label={`共有する`}> | ||
<IconButton | ||
color="more" | ||
aria-label="共有" | ||
onClick={(event) => event.stopPropagation()} | ||
> | ||
<IosShare /> | ||
</IconButton> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters