diff --git a/src/components/EvolutionSpecies/EvolutionSpecies.stories.tsx b/src/components/EvolutionSpecies/EvolutionSpecies.stories.tsx index 3b538d4..9b3583c 100644 --- a/src/components/EvolutionSpecies/EvolutionSpecies.stories.tsx +++ b/src/components/EvolutionSpecies/EvolutionSpecies.stories.tsx @@ -15,6 +15,7 @@ Primary.args = { types: ['grass', 'poison'], image_url: 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/dream-world/1.svg', + name: 'Bulbasaur', }; export const Bulbasaur = Template.bind({}); @@ -22,6 +23,7 @@ Bulbasaur.args = { types: ['grass', 'poison'], image_url: 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/dream-world/1.svg', + name: 'Bulbasaur', }; export const Magneton = Template.bind({}); @@ -29,4 +31,5 @@ Magneton.args = { types: ['electric', 'steel'], image_url: 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/dream-world/82.svg', + name: 'Magneton', }; diff --git a/src/components/EvolutionSpecies/EvolutionSpecies.tsx b/src/components/EvolutionSpecies/EvolutionSpecies.tsx index 85107d8..1868755 100644 --- a/src/components/EvolutionSpecies/EvolutionSpecies.tsx +++ b/src/components/EvolutionSpecies/EvolutionSpecies.tsx @@ -6,10 +6,15 @@ import { colorTypeGradients } from 'components/utils'; export interface EvolutionSpeciesProps { types: string[]; + name: string; image_url: string; } -const EvolutionSpecies = ({ types, image_url }: EvolutionSpeciesProps) => { +const EvolutionSpecies = ({ + types, + name, + image_url, +}: EvolutionSpeciesProps) => { const finalColor = colorTypeGradients(types); return ( @@ -46,6 +51,7 @@ const EvolutionSpecies = ({ types, image_url }: EvolutionSpeciesProps) => { +
{name}
); diff --git a/src/components/EvolutionSpecies/index.ts b/src/components/EvolutionSpecies/index.ts new file mode 100644 index 0000000..f413555 --- /dev/null +++ b/src/components/EvolutionSpecies/index.ts @@ -0,0 +1 @@ +export { default } from './EvolutionSpecies';