Skip to content

Commit

Permalink
refactor: remove type attribute and use ...props instead
Browse files Browse the repository at this point in the history
- Button
- IconButton
  • Loading branch information
lokba committed Oct 4, 2022
1 parent b7dc136 commit 420cfd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions frontend/src/components/@common/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const Button = ({
className,
variant = BUTTON_VARIANT.CONTAINED,
cancel = false,
type,
children,
...props
}: ButtonProps) => {
Expand All @@ -26,7 +25,6 @@ const Button = ({
className={classNames(className, styles[variant], styles.button, {
[styles.cancel]: cancel,
})}
type={type}
{...props}
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/@common/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export type IconButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
alt?: string;
};

const IconButton = ({ type, className, src, alt, ...props }: IconButtonProps) => {
const IconButton = ({ className, src, alt, ...props }: IconButtonProps) => {
return (
<button type={type} className={styles.button} {...props}>
<button className={styles.button} {...props}>
<img src={src} alt={alt} className={className} />
</button>
);
Expand Down

0 comments on commit 420cfd1

Please sign in to comment.