PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 3.3.2
Block Animations, Motion & Scroll Effects – Ghost Kit v3.3.2
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 3.3.2, at gutenberg/components/modal/index.js

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