woocommerce/packages/js/components/src/animation-slider
Christopher Allford d2d8d78be1 Moved WCA Packages
This commit moves all of the packages in
`plugins/woocommerce-admin/packages` to their
new home in `packages/js`.
2022-03-18 14:25:26 -07:00
..
stories Moved WCA Packages 2022-03-18 14:25:26 -07:00
test Moved WCA Packages 2022-03-18 14:25:26 -07:00
README.md Moved WCA Packages 2022-03-18 14:25:26 -07:00
index.js Moved WCA Packages 2022-03-18 14:25:26 -07:00
style.scss Moved WCA Packages 2022-03-18 14:25:26 -07:00

README.md

AnimationSlider

This component creates slideable content controlled by an animate prop to direct the contents to slide left or right. All other props are passed to CSSTransition. More info at http://reactcommunity.org/react-transition-group/css-transition

Usage

<AnimationSlider animationKey="1" animate="right">
	{ ( status ) => (
		<span>One (1)</span>
	) }
</AnimationSlider>

Props

Name Type Default Description
children function null (required) A function returning rendered content with argument status, reflecting CSSTransition status
animationKey any null (required) A unique identifier for each slideable page
animate string null null, 'left', 'right', to designate which direction to slide on a change
onExited function null A function to be executed after a transition is complete, passing the containing ref as the argument