Implemented index.ts for PokemonTypes

develop
Jason Zhu 2023-05-07 22:32:06 +10:00
parent 93fe0cb24a
commit 1f0ab75d6e
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import { Tooltip, Zoom } from '@mui/material';
import * as pokeTypeAsset from 'assets/types';
import './PokemonTypes.css';
function findPokeTypeAsset(pokeType: string) {
export const findPokeTypeAsset = (pokeType: string) => {
switch (pokeType) {
case 'normal':
return pokeTypeAsset.pokeType_normal;
@ -46,7 +46,7 @@ function findPokeTypeAsset(pokeType: string) {
default:
return pokeTypeAsset.pokeType_normal;
}
}
};
export interface PokemonTypesProps {
types: string[];

View File

@ -0,0 +1,2 @@
export * from './PokemonTypes';
export { default } from './PokemonTypes';