|
7 | 7 | import { i18n } from '@kbn/i18n'; |
8 | 8 | import React, { useMemo } from 'react'; |
9 | 9 | import { EuiI18nNumber } from '@elastic/eui'; |
10 | | -import styled from 'styled-components'; |
11 | 10 | import { ResolverNodeStats } from '../../../common/endpoint/types'; |
12 | 11 | import { useRelatedEventByCategoryNavigation } from './use_related_event_by_category_navigation'; |
13 | 12 | import { useColors } from './use_colors'; |
@@ -43,11 +42,10 @@ interface ResolverSubmenuOption { |
43 | 42 | export type ResolverSubmenuOptionList = ResolverSubmenuOption[] | string; |
44 | 43 |
|
45 | 44 | /** |
46 | | - * A Submenu to be displayed in one of two forms: |
47 | | - * 1) Provided a collection of `optionsWithActions`: it will call `menuAction` then - if and when menuData becomes available - display each item with an optional prefix and call the supplied action for the options when that option is clicked. |
48 | | - * 2) Provided `optionsWithActions` is undefined, it will call the supplied `menuAction` when its host button is clicked. |
| 45 | + * A Submenu that displays a collection of "pills" for each related event |
| 46 | + * category it has events for. |
49 | 47 | */ |
50 | | -const NodeSubMenuComponents = React.memo( |
| 48 | +export const NodeSubMenuComponents = React.memo( |
51 | 49 | ({ |
52 | 50 | className, |
53 | 51 | nodeID, |
@@ -117,53 +115,3 @@ const NodeSubMenuComponents = React.memo( |
117 | 115 | ); |
118 | 116 | } |
119 | 117 | ); |
120 | | - |
121 | | -export const NodeSubMenu = styled(NodeSubMenuComponents)` |
122 | | - margin: 2px 0 0 0; |
123 | | - padding: 0; |
124 | | - border: none; |
125 | | - display: flex; |
126 | | - flex-flow: column; |
127 | | -
|
128 | | - &.options { |
129 | | - font-size: 0.8rem; |
130 | | - display: flex; |
131 | | - flex-flow: row wrap; |
132 | | - background: transparent; |
133 | | - position: absolute; |
134 | | - top: 4.5em; |
135 | | - contain: content; |
136 | | - width: 12em; |
137 | | - z-index: 2; |
138 | | - } |
139 | | -
|
140 | | - &.options .item { |
141 | | - margin: 0.25ch 0.35ch 0.35ch 0; |
142 | | - padding: 0.35em 0.5em; |
143 | | - height: fit-content; |
144 | | - width: fit-content; |
145 | | - border-radius: 2px; |
146 | | - line-height: 0.8; |
147 | | - } |
148 | | -
|
149 | | - &.options .item button { |
150 | | - appearance: none; |
151 | | - height: fit-content; |
152 | | - width: fit-content; |
153 | | - line-height: 0.8; |
154 | | - outline-style: none; |
155 | | - border-color: transparent; |
156 | | - box-shadow: none; |
157 | | - } |
158 | | -
|
159 | | - &.options .item button:focus { |
160 | | - outline-style: none; |
161 | | - border-color: transparent; |
162 | | - box-shadow: none; |
163 | | - text-decoration: underline; |
164 | | - } |
165 | | -
|
166 | | - &.options .item button:active { |
167 | | - transform: scale(0.95); |
168 | | - } |
169 | | -`; |
0 commit comments