# ghostkit/3.3.2/gutenberg/extend/display/index.js

Block Animations, Motion &amp; Scroll Effects – Ghost Kit, version 3.3.2. 66 lines.

- Page: https://pluginprobe.com/plugins/ghostkit/3.3.2/code/gutenberg/extend/display/index.js
- Raw: https://pluginprobe.com/plugins/ghostkit/3.3.2/raw/gutenberg/extend/display/index.js
- Modified: 2024-02-18T18:40:24+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/3.3.2/code/gutenberg/extend/display/index.js#L10-L20`.

```javascript
import './screenSize';

import { InspectorControls } from '@wordpress/block-editor';
import { hasBlockSupport } from '@wordpress/blocks';
import {
	__experimentalToolsPanel as ExperimentalToolsPanel,
	__stableToolsPanel as StableToolsPanel,
} from '@wordpress/components';
import { addFilter } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';

import ApplyFilters from '../../components/apply-filters';
import getIcon from '../../utils/get-icon';

const ToolsPanel = StableToolsPanel || ExperimentalToolsPanel;

/**
 * Add inspector controls.
 *
 * @param original
 * @param root0
 * @param root0.props
 */
function GhostKitExtensionDisplayInspector(original, { props }) {
	const { name } = props;

	const hasDisplaySupport = hasBlockSupport(name, ['ghostkit', 'display']);

	if (!hasDisplaySupport) {
		return original;
	}

	return (
		<>
			{original}
			<InspectorControls group="styles">
				<ToolsPanel
					label={
						<>
							<span className="ghostkit-ext-icon">
								{getIcon('extension-display')}
							</span>
							<span>{__('Display Conditions', 'ghostkit')}</span>
						</>
					}
				>
					<div className="ghostkit-tools-panel-display">
						<ApplyFilters
							name="ghostkit.extension.display.tools"
							props={props}
						/>
					</div>
				</ToolsPanel>
			</InspectorControls>
		</>
	);
}

// Init filters.
addFilter(
	'ghostkit.editor.extensions',
	'ghostkit/extension/display/inspector',
	GhostKitExtensionDisplayInspector,
	17
);

```
