This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Favorite button | |
| */ | |
| const { __ } = wp.i18n; | |
| const { apiFetch } = wp; | |
| const { | |
| Component, | |
| Fragment | |
| } = wp.element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Favorite button | |
| */ | |
| const { __ } = wp.i18n; | |
| const { apiFetch } = wp; | |
| const { | |
| Component, | |
| Fragment | |
| } = wp.element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wp.hooks.addFilter( | |
| "blocks.getBlockDefaultClassName", | |
| "atomicblocks/ab-column-block-class-name", | |
| abCustomClassName | |
| ); | |
| function abCustomClassName( className, name ) { | |
| if ( 'atomic-blocks/ab-columns' === name ) { | |
| return classnames( | |
| className, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <InnerBlocks template={[ | |
| ['core/heading', { content: 'Test Content', level: '3', }], ]} | |
| templateLock={ false } | |
| /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <InnerBlocks | |
| template={[ | |
| // Add placeholder blocks | |
| ['atomic-blocks/ab-pricing-table-title', { | |
| title: 'Price Title', | |
| fontSize: 'medium', | |
| }], | |
| ['atomic-blocks/ab-pricing-table-subtitle', { | |
| subtitle: 'Price Subtitle Description', | |
| fontSize: 'normal', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * BLOCK: Atomic Blocks Test Block | |
| */ | |
| // Import block dependencies and components | |
| import Inspector from './components/inspector'; | |
| import omit from 'lodash/omit'; | |
| // Extend component | |
| const { Component } = wp.element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| style={ { | |
| backgroundColor: containerBackgroundColor, | |
| textAlign: containerAlignment, | |
| paddingLeft: containerPaddingLeft ? `${containerPaddingLeft}%` : null, | |
| paddingRight: containerPaddingRight ? `${containerPaddingRight}%` : null, | |
| paddingBottom: containerPaddingBottom ? `${containerPaddingBottom}%` : null, | |
| paddingTop: containerPaddingTop ? `${containerPaddingTop}%` : null, | |
| marginTop: containerMarginTop ? `${containerMarginTop}%` : null, | |
| marginBottom: containerMarginBottom ? `${containerMarginBottom}%` : null, | |
| } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div | |
| style={ { | |
| textAlign: containerAlignment, | |
| paddingLeft: `${containerPaddingLeft}%`, | |
| paddingRight: `${containerPaddingRight}%`, | |
| paddingBottom: `${containerPaddingBottom}%`, | |
| paddingTop: `${containerPaddingTop}%`, | |
| marginTop: `${containerMarginTop}%`, | |
| marginBottom: `${containerMarginBottom}%`, | |
| } }> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Inspector Controls | |
| */ | |
| // Setup the block | |
| const { __ } = wp.i18n; | |
| const { Component } = wp.element; | |
| // Import block components | |
| const { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * BLOCK: Atomic Blocks Pricing Table | |
| */ | |
| // Import block dependencies and components | |
| import classnames from 'classnames'; | |
| import Inspector from './components/inspector'; | |
| import PricingTable from './components/pricing'; | |
| import icons from './components/icons'; | |
| import memoize from 'memize'; |