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

Dock the keyboard hide button to the right side of the screen #480

Merged
merged 13 commits into from
Jan 23, 2019
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 122 files
13 changes: 7 additions & 6 deletions src/block-management/block-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { compose } from '@wordpress/compose';
import { Toolbar, ToolbarButton } from '@wordpress/components';
import { BlockFormatControls, BlockControls } from '@wordpress/editor';
import { __ } from '@wordpress/i18n';
import KeyboardHideButton from '../components/keyboard-hide-button';

import styles from './block-toolbar.scss';

Expand Down Expand Up @@ -65,14 +64,16 @@ export class BlockToolbar extends Component<PropsType> {
onClick={ redo }
/>
</Toolbar>
{ showKeyboardHideButton && ( <Toolbar>
<KeyboardHideButton
onPress={ this.onKeyboardHide }
/>
</Toolbar> ) }
<BlockControls.Slot />
<BlockFormatControls.Slot />
</ScrollView>
{ showKeyboardHideButton &&
( <Toolbar passedStyle={ styles.keyboardHideContainer }>
<ToolbarButton
icon="keyboard-hide"
onClick={ this.onKeyboardHide }
/>
</Toolbar> ) }
</View>
);
}
Expand Down
9 changes: 9 additions & 0 deletions src/block-management/block-toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
border-top-color: #e9eff3;
border-top-width: 1;
}

.keyboardHideContainer {
padding-right: 0px;
padding-left: 0px;
padding-top: 4px;
width: 44;
justify-content: center;
align-items: center;
}
32 changes: 0 additions & 32 deletions src/components/keyboard-hide-button.js

This file was deleted.