Skip to content

Commit

Permalink
fix(components-motion): add focus a11y style for Bounce motion (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed May 28, 2022
1 parent cbb8ac2 commit 97e01d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/Motion/Bounce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ const inViewVariants: MotionProps['whileInView'] = {
x: 0,
};

const focusVariants: MotionProps['whileFocus'] = {
x: -5,
};

const hoverVariants: MotionProps['whileHover'] = {
x: -5,
};
Expand All @@ -40,6 +44,7 @@ const Bounce = ({
className={cx('inline-flex', className)}
initial={initialVariants}
whileInView={inViewVariants}
whileFocus={focusVariants}
whileHover={hoverVariants}
whileTap={tapVariants}
transition={{
Expand Down

1 comment on commit 97e01d8

@vercel
Copy link

@vercel vercel bot commented on 97e01d8 May 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog-sabertaz.vercel.app
blog-git-main-sabertaz.vercel.app
blog.tazimi.dev

Please sign in to comment.