Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
atomic
/
blocks
/
product-elements
/
sale-badge
:
index.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { registerBlockType } from '@wordpress/blocks'; /** * Internal dependencies */ import sharedConfig from '../shared/config'; import attributes from './attributes'; import edit from './edit'; import { BLOCK_TITLE as title, BLOCK_ICON as icon, BLOCK_DESCRIPTION as description, } from './constants'; const blockConfig = { title, description, icon: { src: icon, foreground: '#874FB9', }, supports: { html: false, }, attributes, edit, }; registerBlockType( 'woocommerce/product-sale-badge', { ...sharedConfig, ...blockConfig, } );