Skip to content

Commit

Permalink
fix: extract common chakra ring color
Browse files Browse the repository at this point in the history
  • Loading branch information
masonmcelvain committed Dec 2, 2023
1 parent 6fc08cf commit 4ea157e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function Card({ linkData, isInEditMode, onClick }: CardProps) {

const dragPseudo = isDragEventInProgress
? ""
: "hover:bg-white hover:bg-opacity-10 focus-visible:outline-none focus-visible:ring focus-visible:ring-[rgba(66,153,225,0.6)] active:bg-white active:bg-opacity-[.16] dark:hover:bg-[#EDF2F7] dark:active:bg-[#E2E8F0]";
: "hover:bg-white hover:bg-opacity-10 focus-visible:outline-none focus-visible:ring focus-visible:focus-visible:ring-chakra-focus active:bg-white active:bg-opacity-[.16] dark:hover:bg-[#EDF2F7] dark:active:bg-[#E2E8F0]";
const dragTruncate = isDragEventInProgress
? ""
: "group-hover:overflow-visible group-hover:whitespace-normal";
Expand Down
4 changes: 2 additions & 2 deletions src/components/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ export default function Cell({
<div className="absolute left-0 top-0 z-10 flex flex-col items-center justify-center space-y-0.5">
<button
aria-label="Edit this link"
className="relative inline-flex h-6 min-w-[1.5rem] select-none appearance-none items-center justify-center whitespace-nowrap rounded-md bg-transparent align-middle text-xs font-semibold leading-tight outline outline-2 outline-offset-2 outline-transparent transition duration-200 hover:bg-white/10 focus-visible:outline-none focus-visible:ring focus-visible:ring-[rgba(66,153,225,0.6)] active:bg-white/20"
className="relative inline-flex h-6 min-w-[1.5rem] select-none appearance-none items-center justify-center whitespace-nowrap rounded-md bg-transparent align-middle text-xs font-semibold leading-tight outline outline-2 outline-offset-2 outline-transparent transition duration-200 hover:bg-white/10 focus-visible:outline-none focus-visible:ring focus-visible:ring-chakra-focus active:bg-white/20"
onClick={() => openUpdateLinkModal(index)}
>
<Edit2 size={16} />
</button>
<button
aria-label="Delete this link"
className="relative inline-flex h-6 min-w-[1.5rem] select-none appearance-none items-center justify-center whitespace-nowrap rounded-md bg-transparent align-middle text-xs font-semibold leading-tight text-red-300 outline outline-2 outline-offset-2 outline-transparent transition duration-200 hover:bg-red-300/10 focus-visible:outline-none focus-visible:ring focus-visible:ring-[rgba(66,153,225,0.6)] active:bg-red-300/20"
className="relative inline-flex h-6 min-w-[1.5rem] select-none appearance-none items-center justify-center whitespace-nowrap rounded-md bg-transparent align-middle text-xs font-semibold leading-tight text-red-300 outline outline-2 outline-offset-2 outline-transparent transition duration-200 hover:bg-red-300/10 focus-visible:outline-none focus-visible:ring focus-visible:ring-chakra-focus active:bg-red-300/20"
onClick={deleteChildCard}
>
<X size={20} />
Expand Down
6 changes: 5 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
module.exports = {
content: ["./src/**/*{.html,.ts,.tsx}"],
theme: {
extend: {},
extend: {
ringColor: {
"chakra-focus": "rgba(66,153,225,0.6)",
},
},
},
plugins: [],
};

0 comments on commit 4ea157e

Please sign in to comment.