Last active
November 12, 2018 18:34
-
-
Save itsdavidmorgan/f213e9c5a93857d9f98d7cb7ec155509 to your computer and use it in GitHub Desktop.
Inspector Options For The Profile Block
This file contains hidden or 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
el(InspectorControls, { key: 'inspector' }, // Display the block options in the inspector panel. | |
el(components.PanelBody, { | |
title: i18n.__('Social Media Links'), | |
className: 'block-social-links', | |
initialOpen: true | |
}, | |
el('p', {}, i18n.__('Add links to your social media profiles.')), | |
// Facebook social media text field option. | |
el(TextControl, { | |
type: 'url', | |
label: i18n.__('Facebook URL'), | |
value: facebookURL, | |
onChange: function (newFacebook) { | |
props.setAttributes({ facebookURL: newFacebook }) | |
} | |
}), | |
// Twitter social media text field option. | |
el(TextControl, { | |
type: 'url', | |
label: i18n.__('Twitter URL'), | |
value: twitterURL, | |
onChange: function (newTwitter) { | |
props.setAttributes({ twitterURL: newTwitter }) | |
} | |
}), | |
// Instagram social media text field option. | |
el(TextControl, { | |
type: 'url', | |
label: i18n.__('Instagram URL'), | |
value: instagramURL, | |
onChange: function (newInstagram) { | |
props.setAttributes({ instagramURL: newInstagram }) | |
} | |
}), | |
// LinkedIn social media text field option. | |
el(TextControl, { | |
type: 'url', | |
label: i18n.__('LinkedIn URL'), | |
value: linkedURL, | |
onChange: function (newLinkedIn) { | |
props.setAttributes({ linkedURL: newLinkedIn }) | |
} | |
}), | |
// Email address text field option. | |
el(TextControl, { | |
type: 'text', | |
label: i18n.__('Email Address'), | |
value: emailAddress, | |
onChange: function (newEmail) { | |
props.setAttributes({ emailAddress: newEmail }) | |
} | |
})) | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment