Skip to content

Commit

Permalink
chore: make arrow button optinal (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
seran-shan committed Jan 23, 2023
1 parent af0b6b4 commit 3d30831
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/common/ArrowButton/ArrowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ export enum Size {
}

interface ArrowButtonProps {
direction: Direction
onClick: () => void
alt: string
size?: Size
direction: Direction,
onClick?: () => void,
alt: string,
size?: Size,
ref?: React.Ref<HTMLButtonElement>,
}

const ArrowButton: React.FC<ArrowButtonProps> = ({
direction,
onClick,
alt,
size = Size.Small,
ref,
}) => {
const variant = getVariant(direction)
const dimentions = getDimentions(size === Size.Large ? 2 : 1)
Expand All @@ -45,6 +47,7 @@ const ArrowButton: React.FC<ArrowButtonProps> = ({
}}
whileTap={{ scale: 0.9 }}
transition={{ duration: 0 }}
ref={ref}
>
<Image src={ArrowIcon} height={dimentions.h} width={dimentions.w} alt={alt} />
</motion.button>
Expand Down

0 comments on commit 3d30831

Please sign in to comment.