UNPKG

@empathyco/x-components

Version:
61 lines (31 loc) 1.13 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [useCollapseAnimation](./x-components.usecollapseanimation.md) ## useCollapseAnimation() function Returns parametrized methods to use in a component to allow the collapsing of the provided property. **Signature:** ```typescript export declare function useCollapseAnimation(property: AnimatedProperty): { expand: (element: HTMLElement) => void; cleanUpAnimationStyles: (element: HTMLElement) => void; collapse: (element: HTMLElement) => void; }; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> property </td><td> AnimatedProperty </td><td> The property that will be animated. </td></tr> </tbody></table> **Returns:** { expand: (element: HTMLElement) =&gt; void; cleanUpAnimationStyles: (element: HTMLElement) =&gt; void; collapse: (element: HTMLElement) =&gt; void; } Composable for the module.