🔧 chore: use proper type

This commit is contained in:
Andre H 2024-02-28 14:20:12 +07:00
parent 3493d735b9
commit 4a87c100d6

View File

@ -1,9 +1,8 @@
import React, { ReactNode } from 'react';
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
import { cn } from 'utils/classnames';
interface IconWithFrameProps {
interface IconWithFrameProps extends ComponentPropsWithoutRef<'div'> {
icon: ReactNode;
className?: string;
hasHighlight?: boolean;
}
@ -11,6 +10,7 @@ export const IconWithFrame = ({
icon,
className,
hasHighlight = true,
...props
}: IconWithFrameProps) => {
return (
<div
@ -21,6 +21,7 @@ export const IconWithFrame = ({
'bg-controls-secondary',
className,
)}
{...props}
>
{hasHighlight && (
<div className="bottom-0 absolute w-[37px] h-px bg-gradient-to-r from-gray-0/0 via-gray-0/50 to-gray-0/0" />