fix: improve Button component and replace HTML

This commit is contained in:
Norbert Maciaszek
2025-08-17 23:21:39 +02:00
parent fd642832c1
commit 4166abeb7d
5 changed files with 81 additions and 35 deletions

View File

@@ -201,22 +201,27 @@ export const HeroMovie: FC<Props> = ({ movieDetails }) => {
{/* Action buttons */}
<div className="flex gap-4 flex-wrap">
<Button
className={`flex items-center gap-3 ${
gradient={
isInStore
? "bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500"
: ""
}`}
? {
from: "from-purple-600 hover:from-purple-500",
to: "to-emerald-600 hover:to-emerald-500",
}
: {
from: "from-purple-600 hover:from-purple-500",
to: "to-pink-600 hover:to-pink-500",
}
}
className={`flex items-center gap-3`}
onClick={handleAddToList}
>
<FaBookmark />
{isInStore ? "Usuń z listy" : "Dodaj do listy"}
</Button>
<Button
theme="glass"
theme={isFavorite ? "rose" : "glass"}
className={`flex items-center gap-3 ${
isFavorite
? "bg-gradient-to-r from-rose-600/90 to-pink-600/90 hover:from-rose-500/90 hover:to-pink-500/90 border-rose-400/30"
: ""
isFavorite ? "bg-gradient-to-r border-rose-400/30" : ""
}`}
onClick={handleToggleFavorite}
>
@@ -224,11 +229,9 @@ export const HeroMovie: FC<Props> = ({ movieDetails }) => {
{isFavorite ? "Usuń z ulubionych" : "Dodaj do ulubionych"}
</Button>
<Button
theme="glass"
theme={isSeen ? "emerald" : "glass"}
className={`flex items-center gap-3 ${
isSeen
? "bg-gradient-to-r from-emerald-600/90 to-teal-600/90 hover:from-emerald-500/90 hover:to-teal-500/90 border-emerald-400/30"
: ""
isSeen ? "bg-gradient-to-r border-emerald-400/30" : ""
}`}
onClick={handleToggleSeen}
>

View File

@@ -39,7 +39,7 @@ export const RecommendedMovies: FC<Props> = ({ movies }) => {
<FaStar className="text-white" size={20} />
</div>
<h2 className="text-3xl font-bold bg-gradient-to-r from-yellow-400 to-orange-400 bg-clip-text text-transparent">
Podobne filmy
Rekomendowane filmy
</h2>
</div>