Skip to content

Commit

Permalink
add share icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohitha-pudu committed Jun 23, 2024
1 parent e490422 commit 8ff2be2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/components/Models.css
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,18 @@
.view-icon {
position: absolute;
bottom: 10px;
right: 10px;
right: 1px;
background-color: rgba(0, 0, 0, 0.5);
border: none;
color: white;
padding: 10px;
border-radius: 50%;
cursor: pointer;
}
.share-icon {
position: absolute;
bottom: 10px;
right: 50px;
background-color: rgba(0, 0, 0, 0.5);
border: none;
color: white;
Expand Down
5 changes: 4 additions & 1 deletion src/components/Models.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import BackToTop from "./BottomToTop";

// Import Font Awesome icons
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faChevronLeft, faChevronRight, faTimes, faExpand } from "@fortawesome/free-solid-svg-icons";
import { faChevronLeft, faChevronRight, faTimes, faExpand,faShareAlt } from "@fortawesome/free-solid-svg-icons";

// Import images
import AkshatImage from "../assets/Timepic.jpg";
Expand Down Expand Up @@ -82,6 +82,9 @@ const Models = () => {
<button className="view-icon" onClick={() => handleImageClick(images[currentImageIndex])}>
<FontAwesomeIcon icon={faExpand} />
</button>
<button className="share-icon">
<FontAwesomeIcon icon={faShareAlt} />
</button>
</div>
<button onClick={nextImage} className="carousel-button">
<FontAwesomeIcon icon={faChevronRight} />
Expand Down

0 comments on commit 8ff2be2

Please sign in to comment.