__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import {
createElement,
Component,
useEffect,
useState,
useContext,
createContext,
Fragment,
} from '@wordpress/element'
import { Dialog, DialogOverlay, DialogContent } from './reach/dialog'
import { Transition, animated } from 'react-spring'
import { __ } from 'ct-i18n'
import classnames from 'classnames'
const AnimatedDialogOverlay = animated(DialogOverlay)
const AnimatedDialogContent = animated(DialogContent)
const defaultIsVisible = (i) => !!i
const Overlay = ({
items,
isVisible = defaultIsVisible,
render,
className,
initialFocusRef,
onDismiss,
onDismissed,
onCloseButtonClick,
}) => {
return (
<Transition
items={items}
onStart={() =>
document.body.classList[isVisible(items) ? 'add' : 'remove'](
'ct-dashboard-overlay-open'
)
}
onRest={(result, spring, item) => {
if (onDismissed && !isVisible(item)) {
onDismissed()
}
}}
config={{ duration: 200 }}
from={{ opacity: 0, y: -10 }}
enter={{ opacity: 1, y: 0 }}
leave={{ opacity: 0, y: 10 }}>
{(props, items) => {
return (
isVisible(items) && (
<AnimatedDialogOverlay
style={{ opacity: props.opacity }}
container={document.body}
onDismiss={() => onDismiss()}
initialFocusRef={initialFocusRef}>
<AnimatedDialogContent
className={classnames(
'ct-admin-modal',
className
)}
style={{
transform: props.y.to(
(y) => `translate3d(0px, ${y}px, 0px)`
),
}}>
<button
className="close-button"
onClick={() =>
onCloseButtonClick
? onCloseButtonClick()
: onDismiss()
}>
×
</button>
{render(items, props)}
</AnimatedDialogContent>
</AnimatedDialogOverlay>
)
)
}}
</Transition>
)
}
export default Overlay
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| reach | Folder | 0775 |
|
|
| Overlay.js | File | 1.83 KB | 0775 |
|
| ProOverlay.js | File | 2.77 KB | 0775 |
|
| ProOverlayBuilderUnknownItem.js | File | 1.27 KB | 0775 |
|
| responsive-controls.js | File | 1.68 KB | 0775 |
|
| useDeviceManager.js | File | 2.49 KB | 0775 |
|