import { Dialog, DialogContent, Tooltip, Zoom } from '@mui/material'; import ArrowRightAltIcon from '@mui/icons-material/ArrowRightAlt'; import './InfoDialogComponent.css'; import { findPokeTypeAsset } from 'components/PokemonTypes'; import { colorTypeGradients } from 'components/utils'; import GenderRate from 'components/GenderRate'; import Delayed from 'components/Delayed'; import EvolutionSpecies from 'components/EvolutionSpecies'; import { InfoDialogDetails } from 'features/InfoDialog/infoDialogSlice'; export interface Stat { stat__name: string; stat__value: number; } export type InfoDialogComponentProps = InfoDialogDetails & { openDialog: boolean; closeDialog: () => void; }; const InfoDialog = ({ openDialog, closeDialog, id, name, types, genera, image, height, weight, genderRatio, description, abilities, stats, evolutionChain, }: InfoDialogComponentProps) => { const finalColor = colorTypeGradients(types); return (
#{String(id).padStart(3, '0')}
{name}
{genera}
poke-img
{types.map(type => (
poke-type
))}

Height {`${height / 10} m/${`${Math.floor( (height / 10) * 3.28, )}'${Math.round((((height / 10) * 3.28) % 1) * 12)}"`} `}

Weight {` ${(weight / 10).toFixed(1)} kg/${(weight * 0.2205).toFixed( 1, )} lbs`}

{genderRatio === -1 ? ( 'Genderless' ) : ( )}
About
{description}
Abilities
    {abilities.map(ability => (
  • {ability} 
  • ))}
Base Stats
{stats.map(stat => (
{stat.stat__name}
{stat.stat__value}
))}
Evolution
{evolutionChain.map(evo => ( {evolutionChain.indexOf(evo) + 1 && evolutionChain.indexOf(evo) < evolutionChain.length - 1 && (
)}
))}
); }; export default InfoDialog;