mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Merge pull request #208 from Zagrios/hotfix/change-color-diamond-supporter
Hotfix/change color diamond supporter
This commit is contained in:
@@ -15,19 +15,19 @@ export function SupporterItem({supporter, delay}: Props) {
|
||||
const additionnalStyles: CSSProperties = (() => {
|
||||
const commonStyles: CSSProperties = {backgroundImage: `url(${txtBg})`, backgroundRepeat: "no-repeat", backgroundPosition: "center"}
|
||||
if(supporter.type === "gold"){ return {color: "#ffe270", textShadow: "0px 0px 10px #ffdd59", backgroundSize: "70% 15px", ...commonStyles}; }
|
||||
if(supporter.type === "diamond"){ return {color: "#e574fc", textShadow: "0px 0px 15px #e056fd", backgroundSize: "70% 19px", ...commonStyles}; }
|
||||
if(supporter.type === "diamond"){ return {color: "#0ef2f8", textShadow: "0px 0px 15px #0ef2f8", backgroundSize: "70% 19px", ...commonStyles}; }
|
||||
if(supporter.type === "sponsor"){ return {color: "#0be881", textShadow: "0px 0px 15px #0be881", backgroundSize: "70% 19px", ...commonStyles}; }
|
||||
return {};
|
||||
})();
|
||||
|
||||
const renderSpan = () => {
|
||||
return <motion.span className={`text-2xl font-bold px-3 pb-1 ${supporter.link && "cursor-pointer"}`} style={additionnalStyles} onClick={openSupporterLink} initial={{y: "100%", opacity: 0}} animate={{y: 0, opacity: 1}} transition={{delay: delay}}>{supporter.username}</motion.span>;
|
||||
return <motion.span className={`text-2xl font-bold px-3 pb-1 ${supporter.link && "cursor-pointer underline"}`} style={additionnalStyles} onClick={openSupporterLink} initial={{y: "100%", opacity: 0}} animate={{y: 0, opacity: 1}} transition={{delay: delay}}>{supporter.username}</motion.span>;
|
||||
}
|
||||
|
||||
const renderItem = () => {
|
||||
if(supporter.type !== "sponsor"){ return renderSpan(); }
|
||||
return (
|
||||
<motion.div className={`flex flex-col justify-center items-center mx-4 ${supporter.link && "cursor-pointer"}`} onClick={openSupporterLink} initial={{y: "100%", opacity: 0}} animate={{y: 0, opacity: 1}} transition={{delay: delay}}>
|
||||
<motion.div className={`flex flex-col justify-center items-center mx-4 ${supporter.link && "cursor-pointer underline"}`} onClick={openSupporterLink} initial={{y: "100%", opacity: 0}} animate={{y: 0, opacity: 1}} transition={{delay: delay}}>
|
||||
<img className="max-w-xs max-h-52 mb-2" src={supporter.img}/>
|
||||
{renderSpan()}
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user