Skip to content

Commit

Permalink
[Canvas] Fixes toggle between edit mode/read only mode (#41293)
Browse files Browse the repository at this point in the history
* Fixed mergeProps in workpad_header/index.js

* set header height
  • Loading branch information
cqliu1 authored Jul 17, 2019
1 parent 580c946 commit a5e4d2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ $canvasLayoutFontSize: $euiFontSizeS;
user-select: none;
}

.canvasLayout__stageHeaderInner {
height: ($euiSizeL * 2);
}

.canvasLayout__stageContent {
flex-grow: 1;
flex-basis: 0%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => ({
...stateProps,
...dispatchProps,
...ownProps,
toggleWriteable: () => setWriteable(!stateProps.isWriteable),
toggleWriteable: () => dispatchProps.setWriteable(!stateProps.isWriteable),
});

export const WorkpadHeader = connect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ export class WorkpadHeader extends React.PureComponent {
return (
<div>
{isModalVisible ? this._elementAdd() : null}
<EuiFlexGroup gutterSize="s" alignItems="center" justifyContent="spaceBetween">
<EuiFlexGroup
gutterSize="s"
alignItems="center"
justifyContent="spaceBetween"
className="canvasLayout__stageHeaderInner"
>
<EuiFlexItem grow={false}>
<EuiFlexGroup alignItems="center" gutterSize="xs">
<EuiFlexItem grow={false}>
Expand Down

0 comments on commit a5e4d2f

Please sign in to comment.