# ghostkit/3.3.3/gutenberg/blocks/counter-box/index.js

Block Animations, Motion &amp; Scroll Effects – Ghost Kit, version 3.3.3. 62 lines.

- Page: https://pluginprobe.com/plugins/ghostkit/3.3.3/code/gutenberg/blocks/counter-box/index.js
- Raw: https://pluginprobe.com/plugins/ghostkit/3.3.3/raw/gutenberg/blocks/counter-box/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.3/code/gutenberg/blocks/counter-box/index.js#L10-L20`.

```javascript
import getIcon from '../../utils/get-icon';
import metadata from './block.json';
import deprecated from './deprecated';
import edit from './edit';
import save from './save';
import transforms from './transforms';

const { name } = metadata;

export { metadata, name };

export const settings = {
	icon: getIcon('block-counter-box', true),
	ghostkit: {
		previewUrl: 'https://www.ghostkit.io/docs/blocks/number-box/',
		customStylesCallback(attributes) {
			const styles = {
				'--gkt-counter-box--number__font-size': undefined,
				'--gkt-counter-box--number__color':
					attributes.numberColor || undefined,
				'&:hover': {
					'--gkt-counter-box--number__color':
						attributes.hoverNumberColor || undefined,
				},
			};

			if (
				typeof attributes.numberSize !== 'undefined' &&
				attributes.numberSize !== ''
			) {
				styles['--gkt-counter-box--number__font-size'] =
					`${attributes.numberSize}px`;
			}

			return styles;
		},
	},
	example: {
		attributes: {
			number: '77',
			numberColor: '#0366d6',
			ghostkit: {
				id: 'example-counter-box',
			},
			className: 'ghostkit-custom-example-counter-box',
		},
		innerBlocks: [
			{
				name: 'core/paragraph',
				attributes: {
					content:
						'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.',
				},
			},
		],
	},
	edit,
	save,
	transforms,
	deprecated,
};

```
