From 6558b71e0c2964be170fe8c5f84573ba810189cf Mon Sep 17 00:00:00 2001 From: Caroline Horn <549577+cchaos@users.noreply.github.com> Date: Tue, 11 Sep 2018 12:11:13 -0400 Subject: [PATCH] Allowing context menu panels to have different widths (#1173) --- CHANGELOG.md | 1 + .../views/context_menu/context_menu_example.js | 16 +++++++++++----- .../context_menu/context_menu_with_content.js | 1 + .../__snapshots__/context_menu.test.js.snap | 2 +- .../context_menu_panel.test.js.snap | 2 +- src/components/context_menu/_context_menu.scss | 1 + src/components/context_menu/context_menu.js | 8 +++++++- src/components/context_menu/context_menu.test.js | 1 + src/components/context_menu/index.d.ts | 1 + 9 files changed, 25 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3cac4fe20e..af406eae3ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Added `euiFacetButton` and `euiFacetGroup` ([#1167](https://github.com/elastic/eui/pull/1167)) +- Added `width` prop to `EuiContextMenu` panels ([#1173](https://github.com/elastic/eui/pull/1173)) ## [`3.10.0`](https://github.com/elastic/eui/tree/v3.10.0) diff --git a/src-docs/src/views/context_menu/context_menu_example.js b/src-docs/src/views/context_menu/context_menu_example.js index 07353e56248..8924170fe4a 100644 --- a/src-docs/src/views/context_menu/context_menu_example.js +++ b/src-docs/src/views/context_menu/context_menu_example.js @@ -90,11 +90,17 @@ export const ContextMenuExample = { code: contextMenuWithContentHtml, }], text: ( -
- Context menu panels can be passed React elements through the
-
+ Context menu panels can be passed React elements through the
+
+ If your panel contents have different widths or you need to ensure that a specific
+ context menu panel has a certain width, add width: [number of pixels]
to the panel tree.
+