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

Commit 234a0f4

Browse files
author
Greg Rickaby
authored
Merge pull request #171 from WebDevStudios/fix/split-lazyblocks
Fix/split lazyblocks
2 parents 46a3cf5 + cabd7c4 commit 234a0f4

File tree

69 files changed

+500
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+500
-238
lines changed

components/atoms/Code/Code.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import PropTypes from 'prop-types'
22
import React from 'react'
3-
import styles from './Code.module.css'
43
import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter'
54
import {tomorrow} from 'react-syntax-highlighter/dist/cjs/styles/prism'
5+
import styles from './Code.module.css'
66

77
/**
88
* Render the Code component.
99
*
1010
* @author WebDevStudios
11-
* @param {object} props The component attributes as props.
12-
* @param {string} props.className Optional classname.
13-
* @param props.id
14-
* @param props.content
15-
* @param {boolean} props.fullWidth Is this a fullwidth block.
16-
* @return {Element} The Code component.
11+
* @param {object} props The component attributes as props.
12+
* @param {string} props.className Optional classname.
13+
* @param {string} props.id The optional ID.
14+
* @param {string} props.content The content for inside the code block.
15+
* @return {Element} The Code component.
1716
*/
1817
export default function Code({id, className, content}) {
1918
// Use the className to pass the langauge.

components/atoms/Image/Image.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1+
import RichText from '@/components/atoms/RichText'
2+
import cn from 'classnames'
13
import Link from 'next/link'
24
import PropTypes from 'prop-types'
35
import React from 'react'
4-
import RichText from '@/components/atoms/RichText'
56
import styles from './Image.module.css'
6-
import cn from 'classnames'
77

88
/**
99
* Render the Image component.
1010
*
1111
* @author WebDevStudios
12-
* @param {string} anchor The anchor/id of the block.
13-
* @param {string} alt The image alt text.
14-
* @param {string} caption The image caption.
15-
* @param {string} className The image class.
16-
* @param {string} id The image ID.
17-
* @param {string} href The URL of the link.
18-
* @param {string} linkTarget Target for the link.
19-
* @param {string} linkClass Class for the link.
20-
* @param {string} rel The rel attribute for the link.
21-
* @param {string} sizeSlug The WP image size.
22-
* @param {string} url The full URL path of the image.
23-
* @return {Element} The Image component.
12+
* @param {object} props The component properties.
13+
* @param {string} props.anchor The anchor/id of the block.
14+
* @param {string} props.alt The image alt text.
15+
* @param {string} props.caption The image caption.
16+
* @param {string} props.className The image class.
17+
* @param {string} props.id The image ID.
18+
* @param {string} props.href The URL of the link.
19+
* @param {string} props.linkTarget Target for the link.
20+
* @param {string} props.linkClass Class for the link.
21+
* @param {string} props.rel The rel attribute for the link.
22+
* @param {string} props.url The full URL path of the image.
23+
* @return {Element} The Image component.
2424
*/
2525
export default function Image({
2626
alt,
@@ -80,6 +80,5 @@ Image.propTypes = {
8080
linkClass: PropTypes.string,
8181
linkTarget: PropTypes.string,
8282
rel: PropTypes.string,
83-
sizeSlug: PropTypes.string,
8483
url: PropTypes.string
8584
}

components/atoms/PullQuote/PullQuote.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import styles from './PullQuote.module.css'
77
* PullQuote Block
88
*
99
* @author WebDevStudios
10-
* @param {string} value The pull quote content of the block.
11-
* @param {string} citation The optional author citation.
12-
* @param {string} id Optional anchor/id.
13-
* @param {string} className Optional classnames.
14-
* @return {Element} The PullQuote component.
10+
* @param {object} props The component properties.
11+
* @param {string} props.value The pull quote content of the block.
12+
* @param {string} props.citation The optional author citation.
13+
* @param {string} props.id Optional anchor/id.
14+
* @param {string} props.className Optional classnames.
15+
* @return {Element} The PullQuote component.
1516
*/
1617
export default function PullQuote({value, citation, id, className}) {
1718
return (

components/atoms/Quote/Quote.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import styles from './Quote.module.css'
99
* The core Quote block from Gutenberg.
1010
*
1111
* @author WebDevStudios
12-
* @param {string} value The quote content of the block.
13-
* @param {string} citation The optional author citation.
14-
* @param {string} id Optional anchor/id.
15-
* @param {string} className Optional classnames.
16-
* @return {Element} The Quote component.
12+
* @param {object} props The component properties.
13+
* @param {string} props.value The quote content of the block.
14+
* @param {string} props.citation The optional author citation.
15+
* @param {string} props.id Optional anchor/id.
16+
* @param {string} props.className Optional classnames.
17+
* @return {Element} The Quote component.
1718
*/
1819
export default function Quote({value, citation, id, className}) {
1920
return (

components/atoms/Separator/Separator.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import styles from './Separator.module.css'
88
* Render the Separator component.
99
*
1010
* @author WebDevStudios
11-
* @param {string} className Optional classname.
12-
* @param {boolean} fullWidth Is this a fullwidth block.
13-
* @return {Element} The Separator component.
11+
* @param {object} props The component properties.
12+
* @param {string} props.className Optional classname.
13+
* @param {boolean} props.fullWidth Is this a fullwidth block.
14+
* @return {Element} The Separator component.
1415
*/
1516
export default function Separator({className, fullWidth}) {
1617
return (

components/atoms/Spacer/Spacer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import React from 'react'
55
* Render the Spacer component.
66
*
77
* @author WebDevStudios
8-
* @param {string} anchor Optional anchor/id.
9-
* @param {number} height The height of the spacer.
10-
* @return {Element} The Spacer component.
8+
* @param {object} props The component properties.
9+
* @param {string} props.anchor Optional anchor/id.
10+
* @param {number} props.height The height of the spacer.
11+
* @return {Element} The Spacer component.
1112
*/
1213
export default function Spacer({height, anchor}) {
1314
const rootEmVal = 16

components/atoms/Table/Table.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import styles from './Table.module.css'
77
* Table Block
88
*
99
* @author WebDevStudios
10-
* @param {string} id Optional anchor/id.
11-
* @param {string} head The optional table head array.
12-
* @param {string} body The table body array.
13-
* @param {string} body The table body array.
14-
* @param {string} foot The optional table foorter array.
15-
* @param {string} caption Optional table caption.
16-
* @param {string} className Optional classnames.
17-
* @return {Element} The Table component.
10+
* @param {object} props The component properties.
11+
* @param {string} props.id Optional anchor/id.
12+
* @param {string} props.head The optional table head array.
13+
* @param {string} props.body The table body array.
14+
* @param {string} props.foot The optional table foorter array.
15+
* @param {string} props.caption Optional table caption.
16+
* @param {string} props.className Optional classnames.
17+
* @return {Element} The Table component.
1818
*/
1919
export default function Table({id, head, body, foot, caption, className}) {
2020
return (

components/blocks/BlockHero/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

components/blocks/BlockAccordions/BlockAccordions.js renamed to components/blocks/Gutenberg/BlockAccordions/BlockAccordions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import PropTypes from 'prop-types'
66
* A custom ACF Block for displaying accordions.
77
*
88
* @author WebDevStudios
9-
* @param {object} props The component attributes as props.
9+
* @param {object} props The component props.
10+
* @param {object} props.props The component attributes as props.
11+
* @return {Element} The Accordion component.
1012
*/
1113
export default function BlockAccordions({props}) {
1214
const {

0 commit comments

Comments
 (0)