PluginProbe
Extendify / 3.1.4
Extendify v3.1.4
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Agent / components / ScrollDownButton.jsx

ScrollDownButton.jsx in Extendify 3.1.4, at src/Agent/components/ScrollDownButton.jsx

30 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2 import { arrowDown, Icon } from '@wordpress/icons';
3 import { AnimatePresence, motion } from 'framer-motion';
4
5 export const ScrollDownButton = ({ canScrollDown, onClick }) => {
6 return (
7 <div className="pointer-events-none sticky bottom-1 flex h-8 items-center justify-center">
8 <AnimatePresence>
9 {canScrollDown ? (
10 <motion.button
11 key="scroll-down"
12 initial={{ opacity: 0 }}
13 animate={{ opacity: 1 }}
14 exit={{ opacity: 0 }}
15 transition={{ duration: 0.2, exit: { duration: 0 } }}
16 onClick={onClick}
17 type="button"
18 className="pointer-events-auto flex h-fit items-center justify-center gap-2 whitespace-nowrap rounded-full border border-gray-500 bg-white/90 p-1 text-sm font-medium text-design-main shadow-lg transition-colors hover:bg-gray-100 focus-visible:ring-design-main disabled:pointer-events-none"
19 >
20 <Icon fill="currentColor" icon={arrowDown} size={20} />
21 <span className="sr-only">
22 {__('Scroll down', 'extendify-local')}
23 </span>
24 </motion.button>
25 ) : null}
26 </AnimatePresence>
27 </div>
28 );
29 };
30