UNPKG

@ebay/ebayui-core

Version:

Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.

20 lines (19 loc) 818 B
/** * Calculates the maximum width for an element within its container. * Works my making the element as large as possible, reading its width, * and then restoring its original width. * * @param {HTMLElement} el the element to get the max width for */ export declare function getMaxWidth(el: HTMLElement): number; /** * Determines if the user has requested reduced motion in their system preferences. * * This function checks the `prefers-reduced-motion` media query to see if the user * has indicated that they prefer reduced motion. This can be useful for improving * accessibility by disabling animations or transitions for users who may be sensitive * to motion. * * @returns {boolean} `true` if the user prefers reduced motion, `false` otherwise. */ export declare const useReducedMotion: boolean;