芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/public_html/wp-content/plugins/blocksy-companion/static/js/helpers/Overlay.js
import { createElement, Component, useEffect, useState, useContext, createContext, Fragment, } from '@wordpress/element' import { Dialog, DialogOverlay, DialogContent } from './reach/dialog' import { Transition } from 'blocksy-options' import { __ } from 'ct-i18n' import classnames from 'classnames' const defaultIsVisible = (i) => !!i const Overlay = ({ items, isVisible = defaultIsVisible, render, className, onDismiss, }) => { return (
document.body.classList[isVisible(items) ? 'add' : 'remove']( 'ct-dashboard-overlay-open' ) } config={{ duration: 200 }} from={{ opacity: 0, y: -10 }} enter={{ opacity: 1, y: 0 }} leave={{ opacity: 0, y: 10 }}> {(items) => isVisible(items) && ((props) => (
onDismiss()}>
onDismiss()}> ×
{render(items, props)}
)) }
) } export default Overlay