Skip to content

Commit

Permalink
fix: IconButton props
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Aug 22, 2024
1 parent a504a12 commit f33598b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/renderer/src/components/ui/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,18 @@ export const IconButton = React.forwardRef<
icon: React.JSX.Element
}>
>((props, ref) => {
const { icon } = props
const { icon, ...rest } = props
return (
<button
ref={ref}
type="button"
{...rest}
className={cn(
styledButtonVariant({
variant: "ghost",
}),
"group relative gap-2 bg-accent/10 px-4 hover:bg-accent dark:bg-accent/20 dark:hover:bg-accent/60",
rest.className,
)}
>
<span className="center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { PopoverPortal } from "@radix-ui/react-popover"
import { ActionButton, Button, IconButton } from "@renderer/components/ui/button"
import {
ActionButton,
Button,
IconButton,
} from "@renderer/components/ui/button"
import {
Popover,
PopoverContent,
Expand Down Expand Up @@ -61,7 +65,6 @@ export const MarkAllReadButton = forwardRef<
<div className="space-x-4">
<IconButton
icon={<i className="i-mgc-check-filled" />}
className="px-1"
onClick={() => {
handleMarkAllAsRead()
setMarkPopoverOpen(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
import { jotaiStore } from "@renderer/lib/jotai"
import { getStorageNS } from "@renderer/lib/ns"
import { withSettingEnabled } from "@renderer/modules/settings/helper/withSettingEnable"
import { m } from "framer-motion"
import { atomWithStorage } from "jotai/utils"
import { forwardRef, Fragment, useState } from "react"

Expand Down Expand Up @@ -119,7 +118,7 @@ const WarnGoToExternalLinkImpl = forwardRef<
</Label>

<IconButton
icon={<m.i className="i-mingcute-arrow-right-line" />}
icon={<i className="i-mingcute-arrow-right-line" />}
onClick={handleGo}
>
<span className="duration-200 group-hover:opacity-0">Go</span>
Expand Down

0 comments on commit f33598b

Please sign in to comment.