woocommerce/plugins/woocommerce-admin/packages/components/src/animation-slider
Jeff Stieler a0efb6967f Fetch component usage documentation from local README.md.
Format documentation like Calypso, include usage section.
2019-09-06 11:52:18 -07:00
..
docs Convert markdown JSX code blocks to actual JS files for component documentation. 2019-09-06 11:37:18 -07:00
test Build: Move components to packages dir (https://github.com/woocommerce/woocommerce-admin/pull/804) 2018-11-15 13:16:23 -05:00
README.md Fetch component usage documentation from local README.md. 2019-09-06 11:52:18 -07:00
index.js Search filter: focus input box instead of back button 2019-04-09 07:22:14 +12:00
style.scss Build: Move components to packages dir (https://github.com/woocommerce/woocommerce-admin/pull/804) 2018-11-15 13:16:23 -05: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