Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add share icon #329

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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