Skip to content

Commit 8ca4edc

Browse files
authored
WEB-63 Fix squished document cards in DocumentList (#93)
- Add flex-wrap to document list, shrink-0 to elements
2 parents fd7c10b + 143c932 commit 8ca4edc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/app/editor/DocumentList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function NewDocumentCard() {
4242
type="button"
4343
onClick={handleCreateDocument}
4444
disabled={isCreating}
45-
className="flex h-48 w-32 cursor-pointer rounded-lg flex-col items-center justify-center border border-dashed border-gray-400 bg-white p-4 text-center text-gray-700 transition-colors hover:bg-gray-50 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-60"
45+
className="flex h-48 w-32 shrink-0 cursor-pointer rounded-lg flex-col items-center justify-center border border-dashed border-gray-400 bg-white p-4 text-center text-gray-700 transition-colors hover:bg-gray-50 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-60"
4646
>
4747
<span className="text-3xl leading-none">+</span>
4848
<span className="mt-2 text-sm font-medium">
@@ -54,7 +54,7 @@ function NewDocumentCard() {
5454

5555
function DocumentCard({ id, name, lastModified }: { id: number; name: string | null; lastModified: Date | null }) {
5656
return (
57-
<Link href={`/editor/${id}`} className="flex flex-col bg-gray-100 w-32 h-48 rounded-lg">
57+
<Link href={`/editor/${id}`} className="flex flex-col bg-gray-100 w-32 h-48 shrink-0 rounded-lg">
5858
<div className="p-4 text-center">
5959
{getDocumentName({ id, name })}
6060
</div>
@@ -72,7 +72,7 @@ export function DocumentList({ documents }: {
7272
<div className="flex flex-col gap-4">
7373
<h1 className="text-2xl font-bold">Documents</h1>
7474

75-
<div className="flex gap-2">
75+
<div className="flex flex-wrap gap-2">
7676
<NewDocumentCard />
7777

7878
{documents.map((doc) => (

0 commit comments

Comments
 (0)