Skip to content

Commit

Permalink
add responsive design
Browse files Browse the repository at this point in the history
  • Loading branch information
starknetdev committed Aug 31, 2024
1 parent 1db0471 commit e9eecd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/AdventurerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const AdventurerCard = ({ meta, adventurerId }: AdventurerCardProps) => {

return (
<div
className={`relative flex flex-col bg-black border border-terminal-green border-5`}
className={`relative flex flex-col bg-black border border-terminal-green border-5 sm:w-[200px] 2xl:w-[275px] 3xl:w-[350px]`}
>
{(Object.values(revealedStats).every((stat) => stat === "?") ||
isRevealing) && (
Expand Down Expand Up @@ -161,14 +161,19 @@ const AdventurerCard = ({ meta, adventurerId }: AdventurerCardProps) => {
parseInt(revealedStats[stat as keyof typeof revealedStats]),
isRevealing
)
} w-12 flex flex-col text-center`}
} w-full flex flex-col text-center`}
>
<p>{stat.toUpperCase()}</p>
<p>{revealedStats[stat as keyof typeof revealedStats]}</p>
</span>
))}
</div>
<img key={meta.name} src={meta.image} alt={meta.name} className="w-72" />
<img
key={meta.name}
src={meta.image}
alt={meta.name}
className="w-full"
/>
</div>
);
};
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export default {
'100%': { transform: 'translateX(-200%) translateY(-50%) scale(0.8)', opacity: '0' },
},
},
screens: {
'3xl': '2000px',
},
},
},
plugins: [],
Expand Down

0 comments on commit e9eecd1

Please sign in to comment.