# ghostkit/2.25.0/gutenberg/components/modal/index.js

Block Animations, Motion &amp; Scroll Effects – Ghost Kit, version 2.25.0. 37 lines.

- Page: https://pluginprobe.com/plugins/ghostkit/2.25.0/code/gutenberg/components/modal/index.js
- Raw: https://pluginprobe.com/plugins/ghostkit/2.25.0/raw/gutenberg/components/modal/index.js
- Modified: 2022-02-07T14:32:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ghostkit/2.25.0/code/gutenberg/components/modal/index.js#L10-L20`.

```javascript
/**
 * External dependencies
 */
import classnames from 'classnames/dedupe';

/**
 * WordPress dependencies
 */
const { Component } = wp.element;

const { Modal } = wp.components;

/**
 * Component Class
 */
export default class ModalComponent extends Component {
  render() {
    let className = 'ghostkit-component-modal';

    if (this.props.position) {
      className = classnames(className, `ghostkit-component-modal-position-${this.props.position}`);
    }

    if (this.props.size) {
      className = classnames(className, `ghostkit-component-modal-size-${this.props.size}`);
    }

    className = classnames(className, this.props.className);

    return (
      <Modal {...this.props} className={className}>
        {this.props.children}
      </Modal>
    );
  }
}

```
