-
Notifications
You must be signed in to change notification settings - Fork 794
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin Page: Feature Settings Add better docs for feature settings-rel…
…ated components (#4417) * Admin Page: Add docs for the module-settings/connect-module-options High Order Component * Admin Page: Add docs for the module-settings/module-settings-form High Order Component
- Loading branch information
1 parent
df5c441
commit e0191de
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## connectModuleOptions | ||
|
||
A High Order Component that connects to Jetpack modules'options | ||
redux state selectors and action creators. | ||
|
||
**Arguments** | ||
|
||
* {React.Component} Component - The component to be connected to the state | ||
* Return: {React.Component} - The component with some props connected to the state | ||
|
||
This HOC provides the wrapped component with the following property methods | ||
|
||
* validValues( option_name ) | ||
* getOptionCurrentValue( module_name, option_name) | ||
* getSiteRoles() | ||
* isUpdating ( option_name ) | ||
* adminEmailAddress() | ||
* currentIp() | ||
* siteAdminUrl() | ||
* isCurrentUserLinked() | ||
* updateOptions( newOptions ) | ||
* regeneratePostByEmailAddress() | ||
* setUnsavedOptionFlag() | ||
* clearUnsavedOptionFlag() | ||
|
||
## module-settings-form | ||
|
||
A High Order Component that provide a <form> with functionality to handle input values on the forms own React component state. | ||
|
||
_Basically useful for using in composition with the connectModuleOptions HOC._ | ||
|
||
** Props ** | ||
|
||
* getOptionCurrentValue() | ||
* props.module | ||
* props.updateOptions | ||
|
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