@centreon/ui 24.10.15 → 24.10.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Graph/BarChart/BarChart.cypress.spec.tsx +6 -4
- package/src/Graph/BarChart/ResponsiveBarChart.tsx +4 -1
- package/src/Graph/Chart/Chart.cypress.spec.tsx +5 -5
- package/src/Graph/Chart/Chart.tsx +6 -3
- package/src/Graph/common/BaseChart/useComputeBaseChartDimensions.ts +18 -13
- package/src/Graph/common/useMarginTop.ts +17 -0
- package/src/InputField/Select/Autocomplete/Connected/index.tsx +6 -6
- package/src/InputField/Select/Autocomplete/index.tsx +26 -15
- package/src/InputField/Select/Option.tsx +3 -3
- package/src/components/Form/AccessRights/ShareInput/ShareInput.tsx +4 -3
- package/src/components/Form/AccessRights/ShareInput/useShareInput.tsx +15 -10
- package/src/components/Menu/Button/MenuButton.tsx +1 -2
package/package.json
CHANGED
|
@@ -60,15 +60,17 @@ const checkWidth = (orientation): void => {
|
|
|
60
60
|
if (orientation === 'vertical') {
|
|
61
61
|
cy.get('g[class*="visx-rows"] > line')
|
|
62
62
|
.eq(0)
|
|
63
|
-
.
|
|
64
|
-
|
|
63
|
+
.then((graph) => {
|
|
64
|
+
expect(Number(graph[0].attributes.x2.value)).to.be.greaterThan(1140);
|
|
65
|
+
});
|
|
65
66
|
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
69
|
cy.get('g[class*="visx-rows"] > line')
|
|
69
70
|
.eq(0)
|
|
70
|
-
.
|
|
71
|
-
|
|
71
|
+
.then((graph) => {
|
|
72
|
+
expect(Number(graph[0].attributes.x2.value)).to.be.greaterThan(1177);
|
|
73
|
+
});
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
describe('Bar chart', () => {
|
|
@@ -92,7 +92,10 @@ const ResponsiveBarChart = ({
|
|
|
92
92
|
legendDisplay: legend?.display,
|
|
93
93
|
legendPlacement: legend?.placement,
|
|
94
94
|
width,
|
|
95
|
-
|
|
95
|
+
maxRightAxisCharacters,
|
|
96
|
+
maxLeftAxisCharacters,
|
|
97
|
+
title,
|
|
98
|
+
units: allUnits
|
|
96
99
|
});
|
|
97
100
|
|
|
98
101
|
const thresholdValues = flatten([
|
|
@@ -131,10 +131,10 @@ const initializeCustomUnits = ({
|
|
|
131
131
|
const checkGraphWidth = (): void => {
|
|
132
132
|
cy.findByTestId('graph-interaction-zone')
|
|
133
133
|
.should('have.attr', 'height')
|
|
134
|
-
.and('equal', '
|
|
134
|
+
.and('equal', '398');
|
|
135
135
|
|
|
136
136
|
cy.findByTestId('graph-interaction-zone').then((graph) => {
|
|
137
|
-
expect(Number(graph[0].attributes.width.value)).to.be.greaterThan(
|
|
137
|
+
expect(Number(graph[0].attributes.width.value)).to.be.greaterThan(1150);
|
|
138
138
|
});
|
|
139
139
|
};
|
|
140
140
|
|
|
@@ -158,7 +158,7 @@ describe('Line chart', () => {
|
|
|
158
158
|
cy.contains('06/18/2023').should('be.visible');
|
|
159
159
|
|
|
160
160
|
cy.contains('0.45 s').should('be.visible');
|
|
161
|
-
cy.contains('
|
|
161
|
+
cy.contains('75.19%').should('be.visible');
|
|
162
162
|
|
|
163
163
|
cy.makeSnapshot();
|
|
164
164
|
});
|
|
@@ -443,7 +443,7 @@ describe('Line chart', () => {
|
|
|
443
443
|
|
|
444
444
|
cy.contains(':00 AM').should('be.visible');
|
|
445
445
|
|
|
446
|
-
cy.get('text[transform="rotate(-35, -2,
|
|
446
|
+
cy.get('text[transform="rotate(-35, -2, 290.537103928414)"]').should(
|
|
447
447
|
'be.visible'
|
|
448
448
|
);
|
|
449
449
|
|
|
@@ -521,7 +521,7 @@ describe('Line chart', () => {
|
|
|
521
521
|
|
|
522
522
|
checkGraphWidth();
|
|
523
523
|
cy.contains(':00 AM').should('be.visible');
|
|
524
|
-
cy.get('circle[cx="37.
|
|
524
|
+
cy.get('circle[cx="37.375"]').should('be.visible');
|
|
525
525
|
|
|
526
526
|
cy.makeSnapshot();
|
|
527
527
|
});
|
|
@@ -137,6 +137,8 @@ const Chart = ({
|
|
|
137
137
|
secondUnit
|
|
138
138
|
});
|
|
139
139
|
|
|
140
|
+
const allUnits = getUnits(linesGraph);
|
|
141
|
+
|
|
140
142
|
const { legendRef, graphWidth, graphHeight } = useComputeBaseChartDimensions({
|
|
141
143
|
hasSecondUnit: Boolean(secondUnit),
|
|
142
144
|
height,
|
|
@@ -144,7 +146,10 @@ const Chart = ({
|
|
|
144
146
|
legendHeight: legend?.height,
|
|
145
147
|
legendPlacement: legend?.placement,
|
|
146
148
|
width,
|
|
147
|
-
|
|
149
|
+
maxLeftAxisCharacters,
|
|
150
|
+
maxRightAxisCharacters,
|
|
151
|
+
title,
|
|
152
|
+
units: allUnits
|
|
148
153
|
});
|
|
149
154
|
|
|
150
155
|
const xScale = useMemo(
|
|
@@ -205,8 +210,6 @@ const Chart = ({
|
|
|
205
210
|
[displayedLines]
|
|
206
211
|
);
|
|
207
212
|
|
|
208
|
-
const allUnits = getUnits(linesGraph);
|
|
209
|
-
|
|
210
213
|
useEffect(
|
|
211
214
|
() => {
|
|
212
215
|
setLinesGraph(
|
|
@@ -4,7 +4,7 @@ import { equals, isNil } from 'ramda';
|
|
|
4
4
|
|
|
5
5
|
import useResizeObserver from 'use-resize-observer';
|
|
6
6
|
import { margin } from '../../Chart/common';
|
|
7
|
-
import {
|
|
7
|
+
import { useMarginTop } from '../useMarginTop';
|
|
8
8
|
|
|
9
9
|
export const extraMargin = 10;
|
|
10
10
|
|
|
@@ -15,7 +15,10 @@ interface UseComputeBaseChartDimensionsProps {
|
|
|
15
15
|
legendHeight?: number;
|
|
16
16
|
legendPlacement?: string;
|
|
17
17
|
width: number;
|
|
18
|
-
|
|
18
|
+
maxLeftAxisCharacters: number;
|
|
19
|
+
maxRightAxisCharacters: number;
|
|
20
|
+
title?: string;
|
|
21
|
+
units: Array<string>;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
interface UseComputeBaseChartDimensionsState {
|
|
@@ -32,17 +35,22 @@ export const useComputeBaseChartDimensions = ({
|
|
|
32
35
|
legendPlacement,
|
|
33
36
|
hasSecondUnit,
|
|
34
37
|
legendHeight,
|
|
35
|
-
|
|
38
|
+
maxLeftAxisCharacters,
|
|
39
|
+
maxRightAxisCharacters,
|
|
40
|
+
units,
|
|
41
|
+
title
|
|
36
42
|
}: UseComputeBaseChartDimensionsProps): UseComputeBaseChartDimensionsState => {
|
|
37
43
|
const {
|
|
38
44
|
ref: legendRef,
|
|
39
45
|
width: legendRefWidth,
|
|
40
46
|
height: legendRefHeight
|
|
41
47
|
} = useResizeObserver();
|
|
42
|
-
const { height: titleRefHeight } = useResizeObserver();
|
|
48
|
+
const { ref: titleRef, height: titleRefHeight } = useResizeObserver();
|
|
43
49
|
|
|
44
50
|
const currentLegendHeight = legendHeight ?? (legendRefHeight || 0);
|
|
45
51
|
|
|
52
|
+
const marginTop = useMarginTop({ title, units });
|
|
53
|
+
|
|
46
54
|
const legendBoundingHeight =
|
|
47
55
|
!equals(legendDisplay, false) &&
|
|
48
56
|
(isNil(legendPlacement) || equals(legendPlacement, 'bottom'))
|
|
@@ -57,22 +65,19 @@ export const useComputeBaseChartDimensions = ({
|
|
|
57
65
|
const graphWidth =
|
|
58
66
|
width > 0
|
|
59
67
|
? width -
|
|
60
|
-
(hasSecondUnit ?
|
|
61
|
-
|
|
68
|
+
(hasSecondUnit ? maxRightAxisCharacters * 2 : maxRightAxisCharacters) *
|
|
69
|
+
6 -
|
|
70
|
+
(hasSecondUnit ? maxLeftAxisCharacters * 6 : margin.left) -
|
|
62
71
|
legendBoundingWidth
|
|
63
72
|
: 0;
|
|
64
73
|
const graphHeight =
|
|
65
74
|
(height || 0) > 0
|
|
66
|
-
? (height || 0) -
|
|
67
|
-
margin.top -
|
|
68
|
-
legendBoundingHeight -
|
|
69
|
-
(titleRefHeight || 0) -
|
|
70
|
-
5
|
|
75
|
+
? (height || 0) - marginTop - legendBoundingHeight - (titleRefHeight || 0)
|
|
71
76
|
: 0;
|
|
72
|
-
|
|
73
77
|
return {
|
|
74
78
|
graphHeight,
|
|
75
79
|
graphWidth,
|
|
76
|
-
legendRef
|
|
80
|
+
legendRef,
|
|
81
|
+
titleRef
|
|
77
82
|
};
|
|
78
83
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { identity } from 'ramda';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { margin } from '../Chart/common';
|
|
4
|
+
|
|
5
|
+
export const useMarginTop = ({
|
|
6
|
+
title,
|
|
7
|
+
units
|
|
8
|
+
}: { title?: string; units: Array<string> }): number => {
|
|
9
|
+
const hasUnits = useMemo(() => units.some(identity), [units]);
|
|
10
|
+
|
|
11
|
+
const marginTop = useMemo(
|
|
12
|
+
() => (title || hasUnits ? margin.top : 4),
|
|
13
|
+
[title, hasUnits]
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
return marginTop;
|
|
17
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
1
|
+
import { ReactElement, useCallback, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
equals,
|
|
@@ -44,7 +44,7 @@ export interface ConnectedAutoCompleteFieldProps<TData> {
|
|
|
44
44
|
field: string;
|
|
45
45
|
getEndpoint: ({ search, page }) => string;
|
|
46
46
|
decoder?;
|
|
47
|
-
getRenderedOptionText
|
|
47
|
+
getRenderedOptionText?: (option: TData) => ReactElement | string;
|
|
48
48
|
getRequestHeaders?: HeadersInit;
|
|
49
49
|
initialPage: number;
|
|
50
50
|
labelKey?: string;
|
|
@@ -53,9 +53,9 @@ export interface ConnectedAutoCompleteFieldProps<TData> {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
const ConnectedAutocompleteField = (
|
|
56
|
-
AutocompleteField: (props) =>
|
|
56
|
+
AutocompleteField: (props) => ReactElement,
|
|
57
57
|
multiple: boolean
|
|
58
|
-
): ((props) =>
|
|
58
|
+
): ((props) => ReactElement) => {
|
|
59
59
|
const InnerConnectedAutocompleteField = <TData extends { name: string }>({
|
|
60
60
|
initialPage = 1,
|
|
61
61
|
getEndpoint,
|
|
@@ -74,7 +74,7 @@ const ConnectedAutocompleteField = (
|
|
|
74
74
|
changeIdValue,
|
|
75
75
|
...props
|
|
76
76
|
}: ConnectedAutoCompleteFieldProps<TData> &
|
|
77
|
-
Omit<AutocompleteFieldProps, 'options'>):
|
|
77
|
+
Omit<AutocompleteFieldProps, 'options'>): ReactElement => {
|
|
78
78
|
const [options, setOptions] = useState<Array<TData>>([]);
|
|
79
79
|
const [page, setPage] = useState(1);
|
|
80
80
|
const [maxPage, setMaxPage] = useState(initialPage);
|
|
@@ -221,7 +221,7 @@ const ConnectedAutocompleteField = (
|
|
|
221
221
|
debounce(event.target.value);
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
-
const renderOptions = (renderProps, option, { selected }):
|
|
224
|
+
const renderOptions = (renderProps, option, { selected }): ReactElement => {
|
|
225
225
|
const { value } = props;
|
|
226
226
|
|
|
227
227
|
const lastValue = Array.isArray(value) ? last(value) : value;
|
|
@@ -14,6 +14,7 @@ import { UseAutocompleteProps } from '@mui/material/useAutocomplete';
|
|
|
14
14
|
|
|
15
15
|
import { ThemeMode } from '@centreon/ui-context';
|
|
16
16
|
|
|
17
|
+
import type { AutocompleteRenderOptionState } from '@mui/material/Autocomplete';
|
|
17
18
|
import { ForwardedRef, HTMLAttributes, ReactElement, forwardRef } from 'react';
|
|
18
19
|
import { SelectEntry } from '..';
|
|
19
20
|
import { getNormalizedId } from '../../../utils';
|
|
@@ -33,6 +34,11 @@ export type Props = {
|
|
|
33
34
|
error?: string;
|
|
34
35
|
getOptionItemLabel?: (option) => string;
|
|
35
36
|
hideInput?: boolean;
|
|
37
|
+
renderOption?: (
|
|
38
|
+
renderProps: HTMLAttributes<HTMLLIElement>,
|
|
39
|
+
option: SelectEntry,
|
|
40
|
+
state: AutocompleteRenderOptionState
|
|
41
|
+
) => ReactElement;
|
|
36
42
|
label: string;
|
|
37
43
|
loading?: boolean;
|
|
38
44
|
onTextChange?;
|
|
@@ -163,6 +169,7 @@ const AutocompleteField = forwardRef(
|
|
|
163
169
|
autoSizeCustomPadding,
|
|
164
170
|
getOptionItemLabel = (option) => option?.name,
|
|
165
171
|
forceInputRenderValue = false,
|
|
172
|
+
renderOption,
|
|
166
173
|
...autocompleteProps
|
|
167
174
|
}: Props,
|
|
168
175
|
ref?: ForwardedRef<HTMLDivElement>
|
|
@@ -180,7 +187,24 @@ const AutocompleteField = forwardRef(
|
|
|
180
187
|
);
|
|
181
188
|
};
|
|
182
189
|
|
|
183
|
-
const
|
|
190
|
+
const renderOptions = renderOption
|
|
191
|
+
? renderOption
|
|
192
|
+
: (props, option): ReactElement => {
|
|
193
|
+
return (
|
|
194
|
+
<li
|
|
195
|
+
className={classes.options}
|
|
196
|
+
{...(props as HTMLAttributes<HTMLLIElement>)}
|
|
197
|
+
>
|
|
198
|
+
<Option
|
|
199
|
+
thumbnailUrl={displayOptionThumbnail ? option.url : undefined}
|
|
200
|
+
>
|
|
201
|
+
{getOptionItemLabel(option)}
|
|
202
|
+
</Option>
|
|
203
|
+
</li>
|
|
204
|
+
);
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const renderInput = (params): ReactElement => {
|
|
184
208
|
return (
|
|
185
209
|
<TextField
|
|
186
210
|
{...params}
|
|
@@ -271,20 +295,7 @@ const AutocompleteField = forwardRef(
|
|
|
271
295
|
options={options}
|
|
272
296
|
ref={ref}
|
|
273
297
|
renderInput={renderInput}
|
|
274
|
-
renderOption={
|
|
275
|
-
return (
|
|
276
|
-
<li
|
|
277
|
-
className={classes.options}
|
|
278
|
-
{...(props as HTMLAttributes<HTMLLIElement>)}
|
|
279
|
-
>
|
|
280
|
-
<Option
|
|
281
|
-
thumbnailUrl={displayOptionThumbnail ? option.url : undefined}
|
|
282
|
-
>
|
|
283
|
-
{getOptionItemLabel(option)}
|
|
284
|
-
</Option>
|
|
285
|
-
</li>
|
|
286
|
-
);
|
|
287
|
-
}}
|
|
298
|
+
renderOption={renderOptions}
|
|
288
299
|
size="small"
|
|
289
300
|
slotProps={{
|
|
290
301
|
clearIndicator: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject, forwardRef } from 'react';
|
|
1
|
+
import { ReactElement, RefObject, forwardRef } from 'react';
|
|
2
2
|
|
|
3
3
|
import { equals, isNil } from 'ramda';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
@@ -28,12 +28,12 @@ const useStyles = makeStyles()((theme) => ({
|
|
|
28
28
|
|
|
29
29
|
interface Props {
|
|
30
30
|
checkboxSelected?: boolean;
|
|
31
|
-
children: string;
|
|
31
|
+
children: string | ReactElement;
|
|
32
32
|
thumbnailUrl?: string;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const Option = forwardRef(
|
|
36
|
-
({ children, checkboxSelected, thumbnailUrl }: Props, ref):
|
|
36
|
+
({ children, checkboxSelected, thumbnailUrl }: Props, ref): ReactElement => {
|
|
37
37
|
const { classes } = useStyles();
|
|
38
38
|
|
|
39
39
|
return (
|
|
@@ -8,6 +8,7 @@ import { SelectEntry, SingleConnectedAutocompleteField } from '../../../..';
|
|
|
8
8
|
import RoleSelectField from '../common/RoleSelectField';
|
|
9
9
|
import { Endpoints, Labels } from '../models';
|
|
10
10
|
|
|
11
|
+
import { ReactElement } from 'react';
|
|
11
12
|
import ContactSwitch from './ContactSwitch';
|
|
12
13
|
import { useShareInputStyles } from './ShareInput.styles';
|
|
13
14
|
import useShareInput from './useShareInput';
|
|
@@ -18,18 +19,18 @@ interface Props {
|
|
|
18
19
|
roles: Array<SelectEntry>;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
const ShareInput = ({ labels, endpoints, roles }: Props):
|
|
22
|
+
const ShareInput = ({ labels, endpoints, roles }: Props): ReactElement => {
|
|
22
23
|
const { t } = useTranslation();
|
|
23
24
|
const { classes } = useShareInputStyles();
|
|
24
25
|
|
|
25
26
|
const {
|
|
26
|
-
renderOption,
|
|
27
27
|
selectedContact,
|
|
28
28
|
getOptionDisabled,
|
|
29
29
|
getEndpoint,
|
|
30
30
|
selectContact,
|
|
31
31
|
isContactGroup,
|
|
32
32
|
selectedRole,
|
|
33
|
+
getRenderedOptionText,
|
|
33
34
|
setSelectedRole,
|
|
34
35
|
add,
|
|
35
36
|
changeIdValue
|
|
@@ -46,6 +47,7 @@ const ShareInput = ({ labels, endpoints, roles }: Props): JSX.Element => {
|
|
|
46
47
|
disableClearable={false}
|
|
47
48
|
field="name"
|
|
48
49
|
getEndpoint={getEndpoint}
|
|
50
|
+
getRenderedOptionText={getRenderedOptionText}
|
|
49
51
|
getOptionDisabled={getOptionDisabled}
|
|
50
52
|
label={t(
|
|
51
53
|
isContactGroup
|
|
@@ -53,7 +55,6 @@ const ShareInput = ({ labels, endpoints, roles }: Props): JSX.Element => {
|
|
|
53
55
|
: t(labels.autocompleteContact)
|
|
54
56
|
)}
|
|
55
57
|
queryKey={isContactGroup ? labels.contactGroup : labels.contact}
|
|
56
|
-
renderOption={renderOption}
|
|
57
58
|
value={selectedContact}
|
|
58
59
|
onChange={selectContact}
|
|
59
60
|
/>
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Dispatch,
|
|
3
|
+
ReactElement,
|
|
4
|
+
SetStateAction,
|
|
5
|
+
useEffect,
|
|
6
|
+
useState
|
|
7
|
+
} from 'react';
|
|
2
8
|
|
|
3
9
|
import { useAtomValue, useSetAtom } from 'jotai';
|
|
4
10
|
import { equals, includes, isNil } from 'ramda';
|
|
5
11
|
|
|
6
12
|
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
|
|
7
|
-
import { ListItemText, MenuItem } from '@mui/material';
|
|
8
13
|
|
|
9
14
|
import { SelectEntry, buildListingEndpoint } from '../../../..';
|
|
10
15
|
import {
|
|
@@ -20,7 +25,7 @@ interface UseShareInputState {
|
|
|
20
25
|
getEndpoint: (parameters) => string;
|
|
21
26
|
getOptionDisabled: (option) => boolean;
|
|
22
27
|
isContactGroup: boolean;
|
|
23
|
-
|
|
28
|
+
getRenderedOptionText: (option: unknown) => ReactElement | string;
|
|
24
29
|
selectContact: (_, entry) => void;
|
|
25
30
|
selectedContact: AccessRightInitialValues | null;
|
|
26
31
|
selectedRole: string;
|
|
@@ -40,7 +45,7 @@ const useShareInput = (endpoints: Endpoints): UseShareInputState => {
|
|
|
40
45
|
|
|
41
46
|
const selectContact = (_, entry): void => {
|
|
42
47
|
setSelectedContact(entry);
|
|
43
|
-
if (equals('editor', entry
|
|
48
|
+
if (equals('editor', entry?.most_permissive_role)) {
|
|
44
49
|
return;
|
|
45
50
|
}
|
|
46
51
|
setSelectedRole('viewer');
|
|
@@ -71,14 +76,14 @@ const useShareInput = (endpoints: Endpoints): UseShareInputState => {
|
|
|
71
76
|
}
|
|
72
77
|
});
|
|
73
78
|
|
|
74
|
-
const
|
|
79
|
+
const getRenderedOptionText = (option): ReactElement => {
|
|
75
80
|
return (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{includes(option
|
|
81
|
+
<>
|
|
82
|
+
{option?.name}
|
|
83
|
+
{includes(option?.id, accessRightIds) && (
|
|
79
84
|
<CheckCircleIcon color="success" />
|
|
80
85
|
)}
|
|
81
|
-
|
|
86
|
+
</>
|
|
82
87
|
);
|
|
83
88
|
};
|
|
84
89
|
|
|
@@ -102,7 +107,7 @@ const useShareInput = (endpoints: Endpoints): UseShareInputState => {
|
|
|
102
107
|
getEndpoint,
|
|
103
108
|
getOptionDisabled,
|
|
104
109
|
isContactGroup,
|
|
105
|
-
|
|
110
|
+
getRenderedOptionText,
|
|
106
111
|
selectContact,
|
|
107
112
|
selectedContact,
|
|
108
113
|
selectedRole,
|
|
@@ -4,14 +4,13 @@ import {
|
|
|
4
4
|
ArrowDropDown as ArrowDropDownIcon,
|
|
5
5
|
Menu as MenuIcon
|
|
6
6
|
} from '@mui/icons-material';
|
|
7
|
+
import { useStyles } from './MenuButton.styles';
|
|
7
8
|
|
|
8
9
|
import { AriaLabelingAttributes } from '../../../@types/aria-attributes';
|
|
9
10
|
import { DataTestAttributes } from '../../../@types/data-attributes';
|
|
10
11
|
import { Button, ButtonProps } from '../../Button';
|
|
11
12
|
import { useMenu } from '../useMenu';
|
|
12
13
|
|
|
13
|
-
import { useStyles } from './MenuButton.styles';
|
|
14
|
-
|
|
15
14
|
type MenuButtonProps = {
|
|
16
15
|
ariaLabel?: string;
|
|
17
16
|
children?: ReactNode;
|