-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
97 additions
and
96 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ export default function Footer(props) { | |
/> | ||
<div className="text-white flex items-center"> | ||
<EnvelopeClosedIcon className="mr-2 mb-0.5" /> | ||
<p className="text-white text-[14px]"> | ||
<p className="text-white text-[14px] flex gap-1"> | ||
<b>{t("footer.email")} </b>[email protected] | ||
</p> | ||
</div> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
"use client"; | ||
|
||
import React from "react"; | ||
import clsx from "clsx"; | ||
import { Badge } from "../ui/badge"; | ||
|
||
const Img = ({ | ||
fit = "cover", | ||
src, | ||
alt = "", | ||
className, | ||
layout = "top-right", | ||
hasBadge = false, | ||
badgeVariant = "", | ||
badgeSize = "", | ||
isSvg = false, // Nuevo prop para detectar SVG | ||
svgCode = "", // SVG en formato de código | ||
}) => { | ||
const imageContainerClasses = clsx( | ||
// "relative flex w-full h-full", | ||
"relative flex w-full", | ||
className | ||
); | ||
|
||
const imageClasses = clsx( | ||
"w-full h-full flex items-center justify-center", | ||
{ | ||
"object-cover": fit === "cover", | ||
"object-contain": fit === "contain", | ||
} | ||
); | ||
|
||
const badgeLayout = clsx( | ||
"absolute", | ||
{ | ||
"top-2 left-2": layout === "top-left", | ||
"top-2 right-2": layout === "top-right", | ||
"bottom-2 left-2": layout === "bottom-left", | ||
"bottom-2 right-2": layout === "bottom-right", | ||
"top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2": layout === "center", | ||
} | ||
); | ||
|
||
return ( | ||
<div className={imageContainerClasses}> | ||
{isSvg ? ( | ||
<div | ||
className={imageClasses} | ||
dangerouslySetInnerHTML={{ __html: svgCode }} // Renderizamos SVG | ||
/> | ||
) : ( | ||
<img src={src} alt={alt} className={"h-fit w-fit"} /> | ||
)} | ||
{hasBadge && ( | ||
<Badge className={badgeLayout} variant={badgeVariant} size={badgeSize}> | ||
Hola | ||
</Badge> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Img; |
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
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
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.