forked from M3-Academy/desafio-react-e-typescript
feat: Cria o componente IcomList
This commit is contained in:
parent
5e5b51a016
commit
10d0c938ac
21
src/components/IconList/IconList.tsx
Normal file
21
src/components/IconList/IconList.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import React from "react";
|
||||
|
||||
interface Icon {
|
||||
src: string;
|
||||
alt: string;
|
||||
className: string;
|
||||
text?: string;
|
||||
}
|
||||
|
||||
const IconList = ( props: Icon ) => {
|
||||
const { src, alt, className, text } = props;
|
||||
|
||||
return (
|
||||
<li>
|
||||
<p>{text}</p>
|
||||
<img src={src} alt={alt} className={className}/>
|
||||
</li>
|
||||
);
|
||||
};
|
||||
|
||||
export { IconList };
|
Loading…
Reference in New Issue
Block a user