Skip to content

Commit

Permalink
[Canvas] Decrease size of tray toggle (#25470) (#25575)
Browse files Browse the repository at this point in the history
* decrease size of toggle bar

* change bg colors for toggle
  • Loading branch information
Ryan Keairns authored Nov 13, 2018
1 parent 57618ae commit 1593c10
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Expression = ({
toggleAutocompleteEnabled,
}) => {
return (
<EuiPanel>
<EuiPanel className="canvasTray__panel">
<ExpressionInput
functionDefinitions={functionDefinitions}
error={error}
Expand Down
22 changes: 22 additions & 0 deletions x-pack/plugins/canvas/public/components/toolbar/toolbar.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
.canvasToolbar {
position: relative;
}

.canvasTray__toggle {
position: absolute;
top: $euiSize * -1.25;
left: 50%;
background-color: $euiColorLightestShade;
margin: 0;
border-radius: $euiBorderRadius $euiBorderRadius 0 0;

> .euiFlexItem {
margin: 0;
}

button {
padding: $euiSizeXS $euiSizeM;
box-shadow: 0 -2px 1px rgba($euiColorFullShade, .10)
}
}

.canvasToolbar__controls {
padding: $euiSizeM;
height: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiButtonIcon } from '@elastic/eui';
export const Tray = ({ children, done }) => {
return (
<Fragment>
<EuiFlexGroup justifyContent="spaceAround">
<EuiFlexGroup className="canvasTray__toggle" justifyContent="spaceAround">
<EuiFlexItem grow={false}>
<EuiButtonIcon size="s" onClick={done} aria-label="Dismiss tray" iconType="arrowDown" />
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
flex-direction: column;
@include euiBottomShadowFlat;
}

.canvasTray__panel {
background-color: $euiColorLightestShade;
border-radius: 0;
}

0 comments on commit 1593c10

Please sign in to comment.