Implemented index.ts for PokemonTypes
parent
93fe0cb24a
commit
1f0ab75d6e
|
@ -5,7 +5,7 @@ import { Tooltip, Zoom } from '@mui/material';
|
||||||
import * as pokeTypeAsset from 'assets/types';
|
import * as pokeTypeAsset from 'assets/types';
|
||||||
import './PokemonTypes.css';
|
import './PokemonTypes.css';
|
||||||
|
|
||||||
function findPokeTypeAsset(pokeType: string) {
|
export const findPokeTypeAsset = (pokeType: string) => {
|
||||||
switch (pokeType) {
|
switch (pokeType) {
|
||||||
case 'normal':
|
case 'normal':
|
||||||
return pokeTypeAsset.pokeType_normal;
|
return pokeTypeAsset.pokeType_normal;
|
||||||
|
@ -46,7 +46,7 @@ function findPokeTypeAsset(pokeType: string) {
|
||||||
default:
|
default:
|
||||||
return pokeTypeAsset.pokeType_normal;
|
return pokeTypeAsset.pokeType_normal;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export interface PokemonTypesProps {
|
export interface PokemonTypesProps {
|
||||||
types: string[];
|
types: string[];
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
export * from './PokemonTypes';
|
||||||
|
export { default } from './PokemonTypes';
|
Loading…
Reference in New Issue