Skip to content

Commit df72e6c

Browse files
committed
Increase button visibility on alt/gallery/linkcard/upload
1 parent 0bf1fc6 commit df72e6c

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/components/dataDisplay/gallery/Gallery.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default function Gallery(props: Props) {
4343
break;
4444
}
4545
},
46-
[handleBackward, handleForward],
46+
[handleBackward, handleForward]
4747
);
4848

4949
useEffect(() => {
@@ -64,7 +64,7 @@ export default function Gallery(props: Props) {
6464
className="z-50 w-full"
6565
>
6666
<Button
67-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted fixed left-3 top-3 z-[70] rounded-full p-3.5"
67+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-base hover:text-skin-base fixed left-3 top-3 z-[70] rounded-full p-3.5 border border-skin-base"
6868
onClick={(e) => {
6969
e.stopPropagation();
7070
onClose();
@@ -74,24 +74,24 @@ export default function Gallery(props: Props) {
7474
</Button>
7575
{imageCount > 1 && currentIndex > 0 && (
7676
<Button
77-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted fixed left-3 top-1/2 z-[70] rounded-full p-3.5"
77+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-base hover:text-skin-base fixed left-3 top-1/2 z-[70] rounded-full p-3.5 border border-skin-base"
7878
onClick={(e) => {
7979
e.stopPropagation();
8080
handleBackward();
8181
}}
8282
>
83-
<BiLeftArrowAlt />
83+
<BiLeftArrowAlt className="text-lg" />
8484
</Button>
8585
)}
8686
{imageCount > 1 && currentIndex < imageCount - 1 && (
8787
<Button
88-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted fixed right-3 top-1/2 z-[70] rounded-full p-3.5"
88+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-base hover:text-skin-base fixed right-3 top-1/2 z-[70] rounded-full p-3.5 border border-skin-base"
8989
onClick={(e) => {
9090
e.stopPropagation();
9191
handleForward();
9292
}}
9393
>
94-
<BiRightArrowAlt />
94+
<BiRightArrowAlt className="text-lg" />
9595
</Button>
9696
)}
9797

src/components/feedback/altTag/AltTag.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function AltTag(props: Props) {
3636
e.preventDefault();
3737
handleShowAlt();
3838
}}
39-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted absolute bottom-1.5 left-1.5 rounded-md px-2 py-0.5 text-xs font-semibold"
39+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-muted hover:text-skin-base absolute bottom-1.5 left-1.5 rounded-md px-2 py-0.5 text-xs font-semibold border border-skin-base"
4040
>
4141
ALT
4242
</Button>
@@ -58,11 +58,11 @@ export default function AltTag(props: Props) {
5858
className="m-3.5"
5959
>
6060
<Dialog.Close asChild>
61-
<Button className="text-skin-inverted bg-skin-overlay hover:bg-skin-inverted fixed left-3 top-3 z-50 rounded-full p-3.5">
61+
<Button className="text-skin-secondary bg-skin-secondary hover:bg-skin-muted hover:text-skin-base fixed left-3 top-3 z-50 rounded-full p-3.5 border border-skin-base">
6262
<CgClose className="text-xl" />
6363
</Button>
6464
</Dialog.Close>
65-
<div className="text-skin-inverted bg-skin-overlay-muted z-50 max-h-[calc(100svh-10rem)] max-w-xl cursor-text overflow-auto rounded-xl p-4">
65+
<div className="text-skin-inverted bg-skin-overlay-muted z-50 max-h-[calc(100svh-10rem)] max-w-xl cursor-text overflow-auto rounded-xl p-4">
6666
<div className="mb-4 flex flex-wrap justify-between gap-3">
6767
<Dialog.Title className="text-xl font-semibold text-white">
6868
Alternative text

src/components/inputs/editor/LinkCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function LinkCard(props: Props) {
4545

4646
if (error) {
4747
return (
48-
<div className="border-skin-base flex flex-wrap items-center justify-between w-full gap-3 rounded-2xl border p-3">
48+
<div className="bg-skin-base border-skin-base flex flex-wrap items-center justify-between w-full gap-3 rounded-2xl border p-3">
4949
<div className="flex flex-col gap-3">
5050
<span className="text-skin-base w-fit shrink-0">
5151
Could not get info about this link
@@ -55,7 +55,7 @@ export default function LinkCard(props: Props) {
5555
</span>
5656
</div>
5757
<Button
58-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted rounded-full p-1"
58+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-base hover:text-skin-base rounded-full p-2 border border-skin-base"
5959
onClick={(e) => {
6060
e.preventDefault();
6161
onRemoveLinkCard(link);
@@ -70,7 +70,7 @@ export default function LinkCard(props: Props) {
7070
return (
7171
<article className="bg-skin-base border-skin-base relative rounded-2xl border">
7272
<Button
73-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted absolute left-0 top-0 z-50 m-2 rounded-full p-1"
73+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-base hover:text-skin-base absolute left-0 top-0 z-50 m-2 p-2 border border-skin-base rounded-full"
7474
onClick={(e) => {
7575
e.preventDefault();
7676
onRemoveLinkCard(link);

src/components/inputs/editor/UploadPreview.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function UploadPreview(props: Props) {
1919

2020
const handleRemove = (image: UploadImage) => {
2121
onUpdate((prev) =>
22-
prev?.filter((prevImage) => prevImage.url !== image.url),
22+
prev?.filter((prevImage) => prevImage.url !== image.url)
2323
);
2424
};
2525

@@ -29,7 +29,7 @@ export default function UploadPreview(props: Props) {
2929
{images.map((image) => (
3030
<div key={image.url} className="animate-fade relative h-fit">
3131
<Button
32-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted absolute top-0 m-2 rounded-full p-2"
32+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-muted border border-skin-base hover:text-skin-base absolute top-0 m-2 rounded-full p-2"
3333
onClick={(e) => {
3434
e.preventDefault();
3535
handleRemove(image);
@@ -40,16 +40,16 @@ export default function UploadPreview(props: Props) {
4040
<div className="absolute bottom-0 m-2">
4141
<Dialog.Root open={showAltTextModal}>
4242
<Dialog.Trigger>
43-
<div
44-
className="text-skin-icon-inverted bg-skin-overlay hover:bg-skin-inverted hover:text-skin-inverted rounded-full px-3 py-2 text-sm font-medium"
43+
<Button
44+
className="text-skin-secondary bg-skin-secondary hover:bg-skin-muted border border-skin-base hover:text-skin-base rounded-full px-3 py-2 text-sm font-medium"
4545
onClick={() => {
4646
setSelectedImage(image);
4747
setShowAltTextModal(true);
4848
setAltText(image.altText ?? "");
4949
}}
5050
>
5151
{image.altText ? "Edit alt text" : "Add alt text"}
52-
</div>
52+
</Button>
5353
</Dialog.Trigger>
5454
<Dialog.Portal>
5555
<Dialog.Content>
@@ -61,7 +61,7 @@ export default function UploadPreview(props: Props) {
6161
alt="Uploaded image"
6262
width={200}
6363
height={200}
64-
className="mx-auto max-h-80 rounded-xl object-cover md:max-w-xl"
64+
className="mx-auto max-h-80 rounded-xl object-cover md:max-w-xl border border-skin-base"
6565
/>
6666
<div className="mx-auto mt-3 flex items-center gap-2 md:max-w-xl">
6767
<PiWarningCircleFill className="text-skin-base shrink-0 text-2xl" />
@@ -103,8 +103,8 @@ export default function UploadPreview(props: Props) {
103103
? altText
104104
: selectedImage.altText,
105105
})
106-
: prevImage,
107-
),
106+
: prevImage
107+
)
108108
);
109109
}}
110110
className="bg-primary hover:bg-primary-dark text-skin-icon-inverted rounded-full px-6 py-2 text-sm font-semibold"
@@ -125,7 +125,7 @@ export default function UploadPreview(props: Props) {
125125
alt="Uploaded image"
126126
width={200}
127127
height={200}
128-
className="aspect-square max-h-40 w-full rounded-xl object-cover"
128+
className="aspect-square max-h-40 w-full rounded-xl object-cover border border-skin-base"
129129
/>
130130
</div>
131131
))}

0 commit comments

Comments
 (0)