Skip to content

Commit

Permalink
fix: added ref and remove unnecessary imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aizad-deriv committed Nov 3, 2023
1 parent c92f8f3 commit cfde31f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ButtonHTMLAttributes, ComponentProps, CSSProperties, forwardRef } from 'react';
import React, { ButtonHTMLAttributes, ComponentProps, forwardRef, Ref } from 'react';
import classNames from 'classnames';
import { TGenericSizes } from '../types';
import './IconButton.scss';
Expand All @@ -12,7 +12,10 @@ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
}

const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
({ className, color = 'primary', disabled, icon, isRound, onClick, size = 'sm', ...rest }, ref) => {
(
{ className, color = 'primary', disabled, icon, isRound, onClick, size = 'sm', ...rest },
ref: Ref<HTMLButtonElement>
) => {
const iconButtonClassNames = classNames(
'wallets-icon-button',
`wallets-icon-button__size--${size}`,
Expand Down

0 comments on commit cfde31f

Please sign in to comment.