diff --git a/src/components/molecules/BattlesuitCard.tsx b/src/components/molecules/BattlesuitCard.tsx index 37f0213d..5e0409a2 100644 --- a/src/components/molecules/BattlesuitCard.tsx +++ b/src/components/molecules/BattlesuitCard.tsx @@ -1,5 +1,5 @@ /** @jsxImportSource theme-ui */ -import { Box, Card, Text } from '@theme-ui/components' +import { Box, Card, Text, Flex } from '@theme-ui/components' import { useRouter } from 'next/router' import { assetsBucketBaseUrl } from '../../lib/consts' import { BattlesuitData } from '../../lib/honkai3rd/battlesuits' @@ -10,9 +10,10 @@ import SquareImageBox from '../atoms/SquareImageBox' interface BattlesuitCardProps { battlesuit: Pick hidden?: boolean + size?: 'sm' | 'default' } -const BattlesuitCard = ({ battlesuit, hidden }: BattlesuitCardProps) => { +const BattlesuitCard = ({ battlesuit, hidden, size }: BattlesuitCardProps) => { const { locale } = useRouter() const battlesuitName = translate( @@ -21,6 +22,44 @@ const BattlesuitCard = ({ battlesuit, hidden }: BattlesuitCardProps) => { battlesuit.name ) + if (size === 'sm') { + return ( + + + + + + {battlesuitName} + + + + + ) + } + return ( + size?: 'sm' | 'default' } -const StigmataCard = ({ stigmata }: StigmataCardProps) => { +const StigmataCard = ({ stigmata, size }: StigmataCardProps) => { const { locale } = useRouter() const stigmataName = translate( locale, { 'ko-KR': stigmata.krName }, stigmata.name ) + + if (size === 'sm') { + return ( + + + + + + {stigmataName} + + + + + ) + } + return ( hidden?: boolean + size?: 'sm' | 'default' } -const WeaponCard = ({ weapon, hidden }: WeaponCardProps) => { +const WeaponCard = ({ weapon, hidden, size = 'default' }: WeaponCardProps) => { const { locale } = useRouter() const weaponName = translate(locale, { 'ko-KR': weapon.krName }, weapon.name) + if (size === 'sm') { + return ( + + + + + + {weaponName} + + + + + ) + } + return (