Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 9e3d86f

Browse files
committed
Show GravityForm block
1 parent f5cd638 commit 9e3d86f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

components/blocks/BlockGravityForm/BlockGravityForm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import PropTypes from 'prop-types'
55
* GravityForm block.
66
*
77
* @author WebDevStudios
8-
* @param {object} props The component attributes as props.
8+
* @param {object} props The component attributes as props.
9+
* @param {object} props.attributes The attributes from the GravityForms block.
10+
* @return {Element} The rendered GravityForm.
911
*/
1012
export default function BlockGravityForm({attributes}) {
1113
return <GravityForm {...attributes} />

components/blocks/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ export {default as BlockShortcode} from './BlockShortcode'
1313
export {default as BlockSpacer} from './BlockSpacer'
1414
export {default as BlockVideoEmbed} from './BlockVideoEmbed'
1515
export {default as BlockTable} from './BlockTable'
16+
export {default as BlockGravityForm} from './BlockGravityForm'

functions/displayBlock.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export default function displayBlock(block, index) {
4242
// return <Blocks.BlockShortcode {...attributes} key={index} />
4343
case 'core/spacer':
4444
return <Blocks.BlockSpacer {...attributes} key={index} />
45+
case 'gravityforms/form':
46+
return <Blocks.BlockGravityForm attributes={attributes} key={index} />
4547
default:
4648
return <pre key={index}>{JSON.stringify(block, null, 2)}</pre>
4749
}

0 commit comments

Comments
 (0)