This project contains a React component called PokemonThumbnail
, which displays information about a Pokémon.
To use the PokemonThumbnail
component in your React project, you can follow these steps:
-
Install the component using npm or yarn:
npm install pokemon-thumbnail
or
yarn add pokemon-thumbnail
-
Import the component into your React application:
import PokemonThumbnail from 'pokemon-thumbnail';
-
Use the component in your application as needed:
<PokemonThumbnail id={1} name="Bulbasaur" image="bulbasaur.png" type="Grass" height={0.7} weight={6.9} stat1="HP" stat2="Attack" stat3="Defense" stat4="Special Attack" stat5="Special Defense" stat6="Speed" bs1={45} bs2={49} bs3={49} bs4={65} bs5={65} bs6={45} />
The PokemonThumbnail
component accepts the following props:
id
: The Pokémon's ID.name
: The Pokémon's name.image
: The URL or path to the Pokémon's image.type
: The Pokémon's type.height
: The Pokémon's height.weight
: The Pokémon's weight.stat1
tostat6
: The names of the Pokémon's stats.bs1
tobs6
: The base stats of the Pokémon.
Here's an example of how to use the PokemonThumbnail
component:
import React from 'react';
import PokemonThumbnail from 'pokemon-thumbnail';
const App = () => {
return (
<div>
<PokemonThumbnail
id={1}
name="Bulbasaur"
image="bulbasaur.png"
type="Grass"
height={0.7}
weight={6.9}
stat1="HP"
stat2="Attack"
stat3="Defense"
stat4="Special Attack"
stat5="Special Defense"
stat6="Speed"
bs1={45}
bs2={49}
bs3={49}
bs4={65}
bs5={65}
bs6={45}
/>
</div>
);
};
export default App;
This project is licensed under the MIT License - see the LICENSE file for details.