Skip to content
Snippets Groups Projects
Commit 34b569c9 authored by Puneeth Kharvi's avatar Puneeth Kharvi
Browse files

image added

parent 01b90fc4
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,8 @@ function App() {
return (<>
<Image
src={"./gani.jpg"}
alt="Image not found"
src={""}
alt={"Image"}
className={""}
width={"200px"}
height={"200px"}
......
.imageClass {
height: 100;
width: 100;
}
......@@ -3,11 +3,11 @@ import React from "react";
function Image(props) {
const { imageClass, src, alt, width,height,id} = props;
const { imageClass, src, alt, width,height} = props;
return (
<img
id={id}
className={imageClass }
src={src}
alt={alt}
......@@ -18,4 +18,13 @@ function Image(props) {
}
Image.defaultProps = {
src: require("../../images/noimage.jpg"),
alt: "Image",
height: "100px",
width: "100px",
}
export default Image;
\ No newline at end of file
.imageStyleClass {
border-radius: 50%;
}
src/images/noimage.jpg

8.21 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment