PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 2.25.0
Block Animations, Motion & Scroll Effects – Ghost Kit v2.25.0
3.7.2 3.7.1 3.7.0 3.6.1 trunk 1.6.3 2.25.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.6.0
ghostkit / gutenberg / components / modal / index.js

index.js in Block Animations, Motion & Scroll Effects – Ghost Kit 2.25.0, at gutenberg/components/modal/index.js

37 lines 777 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * External dependencies
3 */
4 import classnames from 'classnames/dedupe';
5
6 /**
7 * WordPress dependencies
8 */
9 const { Component } = wp.element;
10
11 const { Modal } = wp.components;
12
13 /**
14 * Component Class
15 */
16 export default class ModalComponent extends Component {
17 render() {
18 let className = 'ghostkit-component-modal';
19
20 if (this.props.position) {
21 className = classnames(className, `ghostkit-component-modal-position-${this.props.position}`);
22 }
23
24 if (this.props.size) {
25 className = classnames(className, `ghostkit-component-modal-size-${this.props.size}`);
26 }
27
28 className = classnames(className, this.props.className);
29
30 return (
31 <Modal {...this.props} className={className}>
32 {this.props.children}
33 </Modal>
34 );
35 }
36 }
37