This file contains 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 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'; |
This file contains 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
// Blocks to add onChange | |
const getColumnsTemplate = memoize( ( columns ) => { | |
return times( columns, n => [ 'atomic-blocks/ab-pricing-table' ] ); | |
} ); | |
... | |
// Change the column value | |
<RangeControl | |
label={ __( 'Columns' ) } |
This file contains 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/quote', { | |
value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac purus nec diam laoreet sollicitudin. Fusce ullamcorper imperdiet turpis, non accumsan enim egestas in.', | |
citation: 'Walter White', | |
}], | |
['core/list', { | |
values: 'Add a list here', | |
ordered: 'false', | |
}], |
This file contains 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 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 classnames from 'classnames'; | |
// Extend component | |
const { Component } = wp.element; |
This file contains 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 classnames from 'classnames'; | |
import Inspector from './components/inspector'; | |
import icons from './components/icons'; | |
import omit from 'lodash/omit'; |
This file contains 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 Profile Box | |
*/ | |
// Import block dependencies and components | |
import classnames from 'classnames'; | |
import Inspector from './components/inspector'; | |
import ProfileBox from './components/profile'; | |
import SocialIcons from './components/social'; | |
import icons from './components/icons'; |
This file contains 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
<?php | |
/** | |
* Server-side rendering for the layout split | |
* | |
* @since 1.3.1 | |
* @package Atomic Blocks | |
*/ | |
/** | |
* Register the block on the server |
This file contains 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 Profile Box | |
*/ | |
// Import block dependencies and components | |
import classnames from 'classnames'; | |
import Inspector from './components/inspector'; | |
import ProfileBox from './components/profile'; | |
import SocialIcons from './components/social'; | |
import AvatarColumn from './components/avatar'; |