Move poke__type css class into PokemonCard component
parent
b56eae4e40
commit
5068a6f728
|
@ -54,8 +54,8 @@ export interface PokemonTypesProps {
|
|||
|
||||
const PokemonTypes = ({ types }: PokemonTypesProps) => {
|
||||
return (
|
||||
// TODO: fix static typed poke__type css
|
||||
<div className="poke__type">
|
||||
// css is set in consumer
|
||||
<>
|
||||
{types.map(type => (
|
||||
<Tooltip title={type} key={type} TransitionComponent={Zoom} arrow>
|
||||
<div className={`poke__type__bg ${type}`}>
|
||||
|
@ -63,7 +63,7 @@ const PokemonTypes = ({ types }: PokemonTypesProps) => {
|
|||
</div>
|
||||
</Tooltip>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -67,8 +67,10 @@ export default function PokemonCard({
|
|||
</div>
|
||||
<div className="poke__name">
|
||||
<h3>{name}</h3>
|
||||
<div className="poke__type">
|
||||
<PokemonTypes types={types} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue