/** * Inspector Controls */ // Setup the block const { __ } = wp.i18n; const { Component } = wp.element; // Import block components const { InspectorControls, BlockDescription, ColorPalette, PanelColorSettings, } = wp.editor; // Import Inspector components const { Panel, PanelBody, PanelRow, RangeControl, SelectControl, TextControl, } = wp.components; // Create an Inspector Controls wrapper Component export default class Inspector extends Component { constructor( props ) { super( ...arguments ); } render() { // Setup the attributes const { profileName, profileTitle, profileContent, profileAlignment, profileImgURL, profileImgID, profileFontSize, profileBackgroundColor, profileTextColor, profileLinkColor, twitter, facebook, instagram, pinterest, google, youtube, github, linkedin, email, website, profileAvatarShape } = this.props.attributes; const { setAttributes } = this.props; // Avatar shape options const profileAvatarShapeOptions = [ { value: 'square', label: __( 'Square', 'atomic-blocks' ) }, { value: 'round', label: __( 'Round', 'atomic-blocks' ) }, ]; // Update color values const onChangeBackgroundColor = value => setAttributes( { profileBackgroundColor: value } ); const onChangeProfileTextColor = value => setAttributes( { profileTextColor: value } ); const onChangeSocialLinkColor = value => setAttributes( { profileLinkColor: value } ); return ( this.props.setAttributes( { profileFontSize: value } ) } min={ 14 } max={ 24 } step={ 1 } /> this.props.setAttributes( { profileAvatarShape: value } ) } />

{ __( 'Add links to your social media site and they will appear in the bottom of the profile box.', 'atomic-blocks' ) }

this.props.setAttributes( { twitter: value } ) } /> this.props.setAttributes( { facebook: value } ) } /> this.props.setAttributes( { instagram: value } ) } /> this.props.setAttributes( { pinterest: value } ) } /> this.props.setAttributes( { google: value } ) } /> this.props.setAttributes( { youtube: value } ) } /> this.props.setAttributes( { github: value } ) } /> this.props.setAttributes( { linkedin: value } ) } /> this.props.setAttributes( { email: value } ) } /> this.props.setAttributes( { website: value } ) } />
); } }