Mark props with defaults as not required (#50816)

This commit is contained in:
Tomek Wytrębowicz 2024-08-21 21:59:42 +02:00 committed by GitHub
parent e1e628ccf0
commit 63f96eb5a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 7 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Mark props with defaults as not required 

View File

@ -192,8 +192,7 @@ SummaryNumber.propTypes = {
/**
* The type of the link
*/
hrefType: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] )
.isRequired,
hrefType: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] ),
/**
* Boolean describing whether the menu list is open. Only applies in mobile view,
* and only applies to the toggle-able item (first in the list).

View File

@ -99,7 +99,7 @@ Timeline.propTypes = {
*/
hideTimestamp: PropTypes.bool,
} )
).isRequired,
),
/**
* Defines how items should be grouped together.
*/

View File

@ -94,8 +94,8 @@ TimelineGroup.propTypes = {
*/
hideTimestamp: PropTypes.bool,
} )
).isRequired,
} ).isRequired,
),
} ),
/**
* Defines how items should be ordered.
*/

View File

@ -69,7 +69,7 @@ TimelineItem.propTypes = {
* The PHP clock format string used to format times, see php.net/date.
*/
clockFormat: PropTypes.string,
} ).isRequired,
} ),
};
export default TimelineItem;

View File

@ -552,7 +552,7 @@ ReportTable.propTypes = {
* Table data of that report. If it's not provided, it will be automatically
* loaded via the provided `endpoint`.
*/
tableData: PropTypes.object.isRequired,
tableData: PropTypes.object,
/**
* Properties to be added to the query sent to the report table endpoint.
*/

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Mark ReportTable tableData prop as not required