Created
September 18, 2023 19:03
-
-
Save martinusso/e7bccf9e0dd90a21b3bd01c85a2774be to your computer and use it in GitHub Desktop.
react components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Box } from '@mui/material'; | |
type ImgProps = { | |
alt?: string; | |
src: string; | |
width: number; | |
height?: number; | |
}; | |
export function Img({ alt, src, height, width }: ImgProps): React.JSX.Element { | |
return <Box component="img" alt={alt} src={src} sx={{ height, width }} />; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment