Skip to content

Commit

Permalink
Reduced min-width of medium flyouts to 448
Browse files Browse the repository at this point in the history
..to accomodate forms.

Also added docs example for this forms width trick.
  • Loading branch information
cchaos committed Jul 17, 2019
1 parent 016cb21 commit 5162f20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src-docs/src/views/flyout/flyout_max_width.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ export class FlyoutMaxWidth extends Component {
<strong>larger custom max-width</strong>
</EuiLink>

<EuiSpacer />

<EuiLink color="primary" onClick={() => this.showFlyout('m', 0)}>
Trick for forms: <strong>Medium</strong> flyout with{' '}
<strong>0 as max-width</strong>
</EuiLink>

{flyout}
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion src/components/flyout/_flyout.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../form/variables';

.euiFlyout {
border-left: $euiBorderThin;
// The mixin augments the above
Expand Down Expand Up @@ -36,7 +38,8 @@ $flyoutSizes: (
max: round(map-get($euiBreakpoints, 's') * .7),
),
'medium': (
min: round(map-get($euiBreakpoints, 'm') * .7), /* 1 */
// Calculated for forms plus padding
min: $euiFormMaxWidth + ($euiSizeM * 2),
width: 50vw,
max: map-get($euiBreakpoints, 'm'),
),
Expand Down

0 comments on commit 5162f20

Please sign in to comment.