This repository has been archived by the owner on Mar 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added inspector component for feature list - working to add alignment…
… toolbar
- Loading branch information
APPLE
authored and
APPLE
committed
Mar 7, 2018
1 parent
0d94c16
commit cd466b1
Showing
3 changed files
with
60 additions
and
26 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
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,50 @@ | ||
/** | ||
* Internal block libraries | ||
*/ | ||
const { __ } = wp.i18n; | ||
const { Component } = wp.element; | ||
const { | ||
InspectorControls, | ||
BlockDescription, | ||
} = wp.blocks; | ||
const { | ||
Toolbar, | ||
Button, | ||
PanelBody, | ||
PanelRow, | ||
TextControl | ||
} = wp.components; | ||
|
||
/** | ||
* Create an Inspector Controls wrapper Component | ||
*/ | ||
export default class Inspector extends Component { | ||
|
||
constructor( props ) { | ||
super( ...arguments ); | ||
} | ||
|
||
render() { | ||
return ( | ||
<InspectorControls key="inspector"> | ||
<PanelBody title={__("Link Options")}> | ||
<PanelRow> | ||
<TextControl | ||
label={__("Link URL")} | ||
value={this.props.attributes.link} | ||
onChange={this.props.onChangeLink} | ||
/> | ||
</PanelRow> | ||
<PanelRow> | ||
<TextControl | ||
label={__("Link Text")} | ||
value={this.props.attributes.buttonText} | ||
onChange={this.onChangeButtonText} | ||
/> | ||
</PanelRow> | ||
</PanelBody> | ||
</InspectorControls> | ||
); | ||
} | ||
|
||
} |
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