Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image settings button #13597

Merged
merged 2 commits into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
/**
* Internal dependencies
*/
import { MediaPlaceholder, RichText, BlockControls } from '@wordpress/editor';
import { MediaPlaceholder, RichText, BlockControls, InspectorControls } from '@wordpress/editor';
import { Toolbar, ToolbarButton, Spinner } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import ImageSize from './image-size';
Expand Down Expand Up @@ -143,6 +143,10 @@ export default class ImageEdit extends React.Component {
);
}

const onImageSettingsButtonPressed = () => {

};

const toolbarEditButton = (
<Toolbar>
<ToolbarButton
Expand All @@ -153,6 +157,14 @@ export default class ImageEdit extends React.Component {
</Toolbar>
);

const inlineToolbarButtons = (
etoledom marked this conversation as resolved.
Show resolved Hide resolved
<ToolbarButton
label={ __( 'Image Settings' ) }
icon="admin-generic"
onClick={ onImageSettingsButtonPressed }
/>
);

const showSpinner = this.state.isUploadInProgress;
const opacity = this.state.isUploadInProgress ? 0.3 : 1;
const progress = this.state.progress * 100;
Expand All @@ -163,6 +175,9 @@ export default class ImageEdit extends React.Component {
<BlockControls>
{ toolbarEditButton }
</BlockControls>
<InspectorControls>
{ inlineToolbarButtons }
</InspectorControls>
<ImageSize src={ url } >
{ ( sizes ) => {
const {
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/components/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export { default as DefaultBlockAppender } from './default-block-appender';
export { default as PostTitle } from './post-title';
export { default as EditorHistoryRedo } from './editor-history/redo';
export { default as EditorHistoryUndo } from './editor-history/undo';
export { default as InspectorControls } from './inspector-controls';