Skip to content

Commit

Permalink
feat: cursor default for buttons and links
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed May 17, 2024
1 parent e96a285 commit 40b0588
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 15 deletions.
9 changes: 9 additions & 0 deletions src/renderer/src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ body,
.no-drag-region {
-webkit-app-region: no-drag;
}

button,
a {
@apply cursor-default;
}

.prose a {
@apply cursor-pointer;
}
2 changes: 1 addition & 1 deletion src/renderer/src/components/entry-column/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function EntryColumn({
<div
key={entry.id}
className={cn(
"rounded-md cursor-pointer transition-colors",
"rounded-md transition-colors",
activedEntry?.id === entry.id && "bg-[#DEDDDC]",
)}
onClick={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/entry-content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function EntryContent({ entry }: { entry: ActivedEntry }) {
<a
href={entry?.url}
target="_blank"
className="block hover:bg-zinc-100 max-w-[598px] mx-auto p-6 rounded-md transition-colors cursor-pointer"
className="block hover:bg-zinc-100 max-w-[598px] mx-auto p-6 rounded-md transition-colors"
>
<div className="text-3xl font-bold select-text break-words">
{entry?.title}
Expand Down
7 changes: 2 additions & 5 deletions src/renderer/src/components/entry-content/share.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ export function EntryShare({
<TooltipTrigger className="flex items-center my-2">
{item.icon ? (
<img
className="w-4 h-4 grayscale cursor-pointer no-drag-region"
className="w-4 h-4 grayscale no-drag-region"
src={item.icon}
onClick={() => execAction(item.action)}
/>
) : (
<i
className={cn(
item.className,
"cursor-pointer no-drag-region",
)}
className={cn(item.className, "no-drag-region")}
onClick={() => execAction(item.action)}
/>
)}
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/src/components/feed-column/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export function FeedList({
<div className="text-sm text-zinc-500 ml-2 flex items-center gap-3">
{expansion ? (
<i
className="i-mingcute-list-collapse-fill cursor-pointer"
className="i-mingcute-list-collapse-fill"
onClick={() => setExpansion(false)}
/>
) : (
<i
className="i-mingcute-list-expansion-fill cursor-pointer"
className="i-mingcute-list-expansion-fill"
onClick={() => setExpansion(true)}
/>
)}
Expand Down Expand Up @@ -126,7 +126,7 @@ function FeedCategory({
{!!data.name && (
<div
className={cn(
"flex items-center justify-between font-medium text-sm leading-loose px-2.5 py-[2px] rounded-md w-full cursor-pointer transition-colors",
"flex items-center justify-between font-medium text-sm leading-loose px-2.5 py-[2px] rounded-md w-full transition-colors",
activedList?.level === levels.folder &&
activedList.name === data.name &&
"bg-[#C9C9C7]",
Expand Down Expand Up @@ -189,7 +189,7 @@ function FeedCategory({
>
<div
className={cn(
"flex items-center justify-between text-sm font-medium leading-loose w-full pr-2.5 py-[2px] rounded-md cursor-pointer",
"flex items-center justify-between text-sm font-medium leading-loose w-full pr-2.5 py-[2px] rounded-md",
activedList?.level === levels.feed &&
activedList.id === feed.feedId &&
"bg-[#C9C9C7]",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/ui/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
"peer inline-flex h-6 w-11 shrink-0 items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
className,
)}
{...props}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/user-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function UserButton({
return (
<div
className={cn(
"h-20 flex items-center gap-2 justify-center py-2 px-5 rounded-xl font-medium cursor-pointer bg-stone-300 text-zinc-600",
"h-20 flex items-center gap-2 justify-center py-2 px-5 rounded-xl font-medium bg-stone-300 text-zinc-600",
className,
)}
>
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/pages/(main)/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function Component() {
<div className="font-bold text-2xl">Subscriptions</div>
<div className="overflow-y-auto">
{views.map((view, index) => (
<>
<div key={view.name}>
<div className="font-semibold flex items-center gap-2 mb-1">
<span className={cn("flex", view.className)}>
{view.icon}
Expand All @@ -38,7 +38,7 @@ export function Component() {
view={index}
hideTitle={true}
/>
</>
</div>
))}
</div>
</div>
Expand Down

0 comments on commit 40b0588

Please sign in to comment.