Skip to content

Commit

Permalink
Popover / ToggleGroupControl: Use useReducedMotion() from `@wordpre…
Browse files Browse the repository at this point in the history
…ss/compose` (WordPress#60168)

* Use useReducedMotion() from @wordpress/compose

* CHANGELOG

Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
  • Loading branch information
3 people authored and cbravobernal committed Apr 9, 2024
1 parent a5a66e1 commit 19a2391
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Expand Up @@ -9,6 +9,7 @@
### Internal

- `Popover`, `ColorPicker`: Obviate pointer event trap #59449 ([#59449](https://github.com/WordPress/gutenberg/pull/59449)).
- `Popover`, `ToggleGroupControl`: Use `useReducedMotion()` ([#60168](https://github.com/WordPress/gutenberg/pull/60168)).

### Experimental

Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/popover/index.tsx
Expand Up @@ -16,7 +16,7 @@ import {
// eslint-disable-next-line no-restricted-imports
import type { HTMLMotionProps, MotionProps } from 'framer-motion';
// eslint-disable-next-line no-restricted-imports
import { motion, useReducedMotion } from 'framer-motion';
import { motion } from 'framer-motion';

/**
* WordPress dependencies
Expand All @@ -33,6 +33,7 @@ import {
createPortal,
} from '@wordpress/element';
import {
useReducedMotion,
useViewportMatch,
useMergeRefs,
__experimentalUseDialog as useDialog,
Expand Down
Expand Up @@ -5,12 +5,12 @@ import type { ForwardedRef } from 'react';
// eslint-disable-next-line no-restricted-imports
import * as Ariakit from '@ariakit/react';
// eslint-disable-next-line no-restricted-imports
import { motion, useReducedMotion } from 'framer-motion';
import { motion } from 'framer-motion';

/**
* WordPress dependencies
*/
import { useInstanceId } from '@wordpress/compose';
import { useReducedMotion, useInstanceId } from '@wordpress/compose';
import { useMemo } from '@wordpress/element';

/**
Expand Down

0 comments on commit 19a2391

Please sign in to comment.