This repository was archived by the owner on Feb 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed
components/molecules/Navigation Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,16 @@ import isLinkActive from '@/functions/isLinkActive'
2
2
import cn from 'classnames'
3
3
import Link from 'next/link'
4
4
import { useRouter } from 'next/router'
5
+ import PropTypes from 'prop-types'
5
6
import styles from './Navigation.module.css'
6
7
7
8
/**
8
9
* Render the Navigation component.
9
10
*
10
11
* @author WebDevStudios
11
- * @param {object } props Navigation props.
12
- * @param {array } props.menu Array of menu items.
13
- * @param {string } props.className Optional classname for the element.
12
+ * @param {object } props Navigation props.
13
+ * @param {Array } props.menu Array of menu items.
14
+ * @param {string } props.className Optional classname for the element.
14
15
* @return {Element } The Navigation component.
15
16
*/
16
17
export default function Navigation ( { menu, className} ) {
@@ -67,3 +68,8 @@ export default function Navigation({menu, className}) {
67
68
</ >
68
69
)
69
70
}
71
+
72
+ Navigation . propTypes = {
73
+ className : PropTypes . string ,
74
+ menu : PropTypes . arrayOf ( PropTypes . object )
75
+ }
Original file line number Diff line number Diff line change @@ -3,9 +3,14 @@ import React from 'react'
3
3
import styles from './DocTable.module.css'
4
4
5
5
/**
6
+ * Render the DocTable component.
7
+ *
6
8
* This component is used in documentaion-only stories to display tabular documentation.
9
+ *
10
+ * @param {* } props The DocTable attributes as props.
11
+ * @return {Element } The DocTable component.
7
12
*/
8
- const DocTable = ( props ) => {
13
+ function DocTable ( props ) {
9
14
return (
10
15
< div className = { styles . docTableWrap } >
11
16
< table className = { styles . docTable } > { props . children } </ table >
Original file line number Diff line number Diff line change
1
+ import PropTypes from 'prop-types'
1
2
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
2
3
import Layout from '@/components/common/Layout'
3
4
import Hero from '@/components/molecules/Hero'
@@ -51,6 +52,10 @@ export default function HomePage({post}) {
51
52
)
52
53
}
53
54
55
+ HomePage . propTypes = {
56
+ post : PropTypes . object
57
+ }
58
+
54
59
/**
55
60
* Get post static props.
56
61
*
You can’t perform that action at this time.
0 commit comments