@axinom/mosaic-ui 0.32.0-rc.1 → 0.32.0-rc.10
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/dist/components/Actions/Action/Action.d.ts.map +1 -1
- package/dist/components/Actions/Actions.models.d.ts +4 -16
- package/dist/components/Actions/Actions.models.d.ts.map +1 -1
- package/dist/components/Buttons/Button/Button.d.ts +9 -10
- package/dist/components/Buttons/Button/Button.d.ts.map +1 -1
- package/dist/components/Buttons/Button/Button.model.d.ts +21 -0
- package/dist/components/Buttons/Button/Button.model.d.ts.map +1 -0
- package/dist/components/Buttons/Button/index.d.ts +3 -0
- package/dist/components/Buttons/Button/index.d.ts.map +1 -0
- package/dist/components/Buttons/Button.model.d.ts +69 -7
- package/dist/components/Buttons/Button.model.d.ts.map +1 -1
- package/dist/components/Buttons/CompositeButton/CompositeButton.d.ts +5 -14
- package/dist/components/Buttons/CompositeButton/CompositeButton.d.ts.map +1 -1
- package/dist/components/Buttons/CompositeButton/CompositeButton.model.d.ts +20 -0
- package/dist/components/Buttons/CompositeButton/CompositeButton.model.d.ts.map +1 -0
- package/dist/components/Buttons/CompositeButton/index.d.ts +3 -0
- package/dist/components/Buttons/CompositeButton/index.d.ts.map +1 -0
- package/dist/components/Buttons/TextButton/TextButton.d.ts +5 -9
- package/dist/components/Buttons/TextButton/TextButton.d.ts.map +1 -1
- package/dist/components/Buttons/TextButton/TextButton.model.d.ts +18 -0
- package/dist/components/Buttons/TextButton/TextButton.model.d.ts.map +1 -0
- package/dist/components/Buttons/TextButton/index.d.ts +3 -0
- package/dist/components/Buttons/TextButton/index.d.ts.map +1 -0
- package/dist/components/Buttons/index.d.ts +3 -3
- package/dist/components/Buttons/index.d.ts.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts.map +1 -1
- package/dist/components/Explorer/Explorer.model.d.ts +2 -2
- package/dist/components/Explorer/Explorer.model.d.ts.map +1 -1
- package/dist/components/Explorer/NavigationExplorer/NavigationExplorer.d.ts +13 -3
- package/dist/components/Explorer/NavigationExplorer/NavigationExplorer.d.ts.map +1 -1
- package/dist/components/FormElements/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/components/FormElements/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.d.ts.map +1 -1
- package/dist/components/List/ListRow/ListRow.d.ts.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +1 -22
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/PageHeader/PageHeader.model.d.ts +23 -0
- package/dist/components/PageHeader/PageHeader.model.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts +20 -33
- package/dist/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts.map +1 -1
- package/dist/components/PageHeader/PageHeaderAction/PageHeaderAction.model.d.ts +47 -0
- package/dist/components/PageHeader/PageHeaderAction/PageHeaderAction.model.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeaderAction/index.d.ts +3 -0
- package/dist/components/PageHeader/PageHeaderAction/index.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeaderBulkActions/PageHeaderBulkActions.d.ts +2 -2
- package/dist/components/PageHeader/PageHeaderBulkActions/PageHeaderBulkActions.d.ts.map +1 -1
- package/dist/components/PageHeader/index.d.ts +3 -2
- package/dist/components/PageHeader/index.d.ts.map +1 -1
- package/dist/components/models.d.ts +22 -0
- package/dist/components/models.d.ts.map +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Actions/Action/Action.spec.tsx +14 -0
- package/src/components/Actions/Action/Action.tsx +5 -2
- package/src/components/Actions/Actions.models.ts +4 -23
- package/src/components/Buttons/Button/Button.model.ts +30 -0
- package/src/components/Buttons/Button/Button.scss +3 -1
- package/src/components/Buttons/Button/Button.spec.tsx +254 -83
- package/src/components/Buttons/Button/Button.stories.tsx +20 -0
- package/src/components/Buttons/Button/Button.tsx +103 -32
- package/src/components/Buttons/Button/index.ts +2 -0
- package/src/components/Buttons/Button.model.ts +84 -9
- package/src/components/Buttons/CompositeButton/CompositeButton.model.ts +32 -0
- package/src/components/Buttons/CompositeButton/CompositeButton.scss +6 -1
- package/src/components/Buttons/CompositeButton/CompositeButton.spec.tsx +277 -89
- package/src/components/Buttons/CompositeButton/CompositeButton.stories.tsx +20 -0
- package/src/components/Buttons/CompositeButton/CompositeButton.tsx +94 -30
- package/src/components/Buttons/CompositeButton/index.ts +2 -0
- package/src/components/Buttons/TextButton/TextButton.model.ts +27 -0
- package/src/components/Buttons/TextButton/TextButton.scss +3 -1
- package/src/components/Buttons/TextButton/TextButton.spec.tsx +198 -87
- package/src/components/Buttons/TextButton/TextButton.stories.tsx +20 -0
- package/src/components/Buttons/TextButton/TextButton.tsx +74 -20
- package/src/components/Buttons/TextButton/index.ts +2 -0
- package/src/components/Buttons/index.ts +3 -6
- package/src/components/Explorer/Explorer.model.ts +2 -2
- package/src/components/Explorer/Explorer.tsx +21 -16
- package/src/components/Explorer/NavigationExplorer/NavigationExplorer.tsx +32 -11
- package/src/components/FormElements/CustomTags/CustomTags.spec.tsx +26 -16
- package/src/components/FormElements/ToggleButton/ToggleButton.tsx +2 -2
- package/src/components/List/List.spec.tsx +23 -0
- package/src/components/List/List.stories.tsx +8 -0
- package/src/components/List/List.tsx +15 -3
- package/src/components/List/ListRow/ListRow.tsx +18 -13
- package/src/components/PageHeader/PageHeader.model.ts +23 -0
- package/src/components/PageHeader/PageHeader.stories.tsx +2 -1
- package/src/components/PageHeader/PageHeader.tsx +2 -26
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.model.ts +60 -0
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.spec.tsx +549 -382
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.stories.tsx +12 -1
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.tsx +94 -44
- package/src/components/PageHeader/PageHeaderAction/index.ts +2 -0
- package/src/components/PageHeader/PageHeaderBulkActions/PageHeaderBulkActions.spec.tsx +2 -2
- package/src/components/PageHeader/PageHeaderBulkActions/PageHeaderBulkActions.tsx +56 -43
- package/src/components/PageHeader/index.ts +3 -2
- package/src/components/models.ts +30 -0
|
@@ -47,18 +47,24 @@ describe('CustomTags', () => {
|
|
|
47
47
|
|
|
48
48
|
it('should render one plus button', () => {
|
|
49
49
|
const wrapper = mount(<CustomTags name="test-name" />);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
const plusButton = wrapper
|
|
51
|
+
.find({
|
|
52
|
+
className: 'plusButton',
|
|
53
|
+
type: 'button',
|
|
54
|
+
})
|
|
55
|
+
.first();
|
|
56
|
+
|
|
57
|
+
expect(plusButton).toHaveLength(1);
|
|
54
58
|
});
|
|
55
59
|
|
|
56
60
|
it('should disable plus button if there is no value in input field', () => {
|
|
57
61
|
const wrapper = mount(<CustomTags name="test-name" />);
|
|
58
|
-
const plusButton = wrapper
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
const plusButton = wrapper
|
|
63
|
+
.find({
|
|
64
|
+
className: 'plusButton',
|
|
65
|
+
type: 'button',
|
|
66
|
+
})
|
|
67
|
+
.first();
|
|
62
68
|
expect(plusButton.prop('disabled')).toBeTruthy();
|
|
63
69
|
});
|
|
64
70
|
|
|
@@ -149,10 +155,12 @@ describe('CustomTags', () => {
|
|
|
149
155
|
input.simulate('change');
|
|
150
156
|
wrapper.update();
|
|
151
157
|
|
|
152
|
-
const plusButton = wrapper
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
const plusButton = wrapper
|
|
159
|
+
.find({
|
|
160
|
+
className: 'plusButton',
|
|
161
|
+
type: 'button',
|
|
162
|
+
})
|
|
163
|
+
.first();
|
|
156
164
|
plusButton.simulate('click');
|
|
157
165
|
|
|
158
166
|
tags = getTagsFromDOM(wrapper);
|
|
@@ -1108,10 +1116,12 @@ describe('CustomTags', () => {
|
|
|
1108
1116
|
input.simulate('change');
|
|
1109
1117
|
wrapper.update();
|
|
1110
1118
|
|
|
1111
|
-
const plusButton = wrapper
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1119
|
+
const plusButton = wrapper
|
|
1120
|
+
.find({
|
|
1121
|
+
className: 'plusButton',
|
|
1122
|
+
type: 'button',
|
|
1123
|
+
})
|
|
1124
|
+
.first();
|
|
1115
1125
|
plusButton.simulate('click');
|
|
1116
1126
|
|
|
1117
1127
|
tags = getTagsFromDOM(wrapper);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { noop } from '../../../helpers/utils';
|
|
4
|
-
import {
|
|
4
|
+
import { CommonJsButtonOptions } from '../../Buttons/Button.model';
|
|
5
5
|
import {
|
|
6
6
|
ConfirmationConfig,
|
|
7
7
|
ConfirmationMode,
|
|
@@ -12,7 +12,7 @@ import { FormElementContainer } from '../FormElementContainer';
|
|
|
12
12
|
import classes from './ToggleButton.scss';
|
|
13
13
|
|
|
14
14
|
export interface ToggleButtonProps
|
|
15
|
-
extends Omit<
|
|
15
|
+
extends Omit<CommonJsButtonOptions, 'buttonContext' | 'onButtonClicked'>,
|
|
16
16
|
BaseFormControl {
|
|
17
17
|
/** Current value. Can be used to control state (default: false) */
|
|
18
18
|
value?: boolean;
|
|
@@ -92,6 +92,29 @@ describe('List', () => {
|
|
|
92
92
|
expect(props.columnSizes).toBe('1fr 1fr 1fr');
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
+
it.each([
|
|
96
|
+
{ value: true, visible: true },
|
|
97
|
+
{ value: () => true, visible: true },
|
|
98
|
+
{ value: () => false, visible: false },
|
|
99
|
+
])(
|
|
100
|
+
'does add an extra column if there is an action button',
|
|
101
|
+
({ value, visible }) => {
|
|
102
|
+
const wrapper = mount(
|
|
103
|
+
<List
|
|
104
|
+
columns={mockListColumns}
|
|
105
|
+
data={mockListData}
|
|
106
|
+
showActionButton={value}
|
|
107
|
+
/>,
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
const rows = wrapper.find(ListRow);
|
|
111
|
+
const props = rows.first().props();
|
|
112
|
+
|
|
113
|
+
expect(props.columnSizes).toBe('1fr 1fr 1fr 50px');
|
|
114
|
+
expect(props.showActionButton).toBe(visible);
|
|
115
|
+
},
|
|
116
|
+
);
|
|
117
|
+
|
|
95
118
|
it.each`
|
|
96
119
|
data | count
|
|
97
120
|
${[{ row: 'one' }, { row: 'two' }, { row: 'three' }]} | ${3}
|
|
@@ -124,6 +124,14 @@ const meta: Meta<StoryListType> = {
|
|
|
124
124
|
description: `<b>[Storybook only]</b> The number of rows to display.
|
|
125
125
|
The story will generate the requests amount of items and assign it to the <code>data</code> prop.`,
|
|
126
126
|
},
|
|
127
|
+
showActionButton: {
|
|
128
|
+
...groups.showActionButton,
|
|
129
|
+
description: `Whether to show the action button in the header row.`,
|
|
130
|
+
options: [true, false, 'random'],
|
|
131
|
+
mapping: {
|
|
132
|
+
random: (): boolean => (Math.random() > 0.5 ? true : false),
|
|
133
|
+
},
|
|
134
|
+
},
|
|
127
135
|
},
|
|
128
136
|
args: {
|
|
129
137
|
columns: defaultColumns,
|
|
@@ -73,7 +73,7 @@ export interface ListProps<T extends Data> {
|
|
|
73
73
|
* Defines whether an action button will be rendered (default: true)
|
|
74
74
|
* Will not render if selectMode is not 'None'
|
|
75
75
|
*/
|
|
76
|
-
showActionButton?: boolean;
|
|
76
|
+
showActionButton?: boolean | ((data: T) => boolean);
|
|
77
77
|
/** Defines when the loading of the next page is triggered. The number represents the number of row left, before a load is triggered. (default: 10) */
|
|
78
78
|
loadingTriggerOffset?: number;
|
|
79
79
|
/** Defines how the list data should be sorted */
|
|
@@ -245,7 +245,7 @@ export const List = <T extends Data>({
|
|
|
245
245
|
|
|
246
246
|
const columnSizes = getColumnsSizeDefinition(
|
|
247
247
|
columns,
|
|
248
|
-
showActionButton,
|
|
248
|
+
Boolean(showActionButton),
|
|
249
249
|
selectionMode,
|
|
250
250
|
!!inlineMenuActions,
|
|
251
251
|
);
|
|
@@ -345,7 +345,8 @@ export const List = <T extends Data>({
|
|
|
345
345
|
verticalTextAlign={verticalTextAlign}
|
|
346
346
|
selectionMode={selectionMode}
|
|
347
347
|
showActionButton={
|
|
348
|
-
|
|
348
|
+
selectionMode === ListSelectMode.None &&
|
|
349
|
+
getActionButtonVisibility(item.data, showActionButton)
|
|
349
350
|
}
|
|
350
351
|
showCheckMark={selectionMode === ListSelectMode.Single}
|
|
351
352
|
showItemCheckbox={selectionMode === ListSelectMode.Multi}
|
|
@@ -383,3 +384,14 @@ export const List = <T extends Data>({
|
|
|
383
384
|
</div>
|
|
384
385
|
);
|
|
385
386
|
};
|
|
387
|
+
|
|
388
|
+
function getActionButtonVisibility<T>(
|
|
389
|
+
data: T,
|
|
390
|
+
showActionButton: boolean | ((item: T) => boolean),
|
|
391
|
+
): boolean {
|
|
392
|
+
if (typeof showActionButton === 'boolean') {
|
|
393
|
+
return showActionButton;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
return showActionButton(data);
|
|
397
|
+
}
|
|
@@ -271,19 +271,24 @@ export const ListRow = <T extends Data>({
|
|
|
271
271
|
/>
|
|
272
272
|
)}
|
|
273
273
|
|
|
274
|
-
{showActionButton &&
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
274
|
+
{showActionButton &&
|
|
275
|
+
(typeof onItemClicked !== 'function' ? (
|
|
276
|
+
<Button
|
|
277
|
+
icon={IconName.ChevronRight}
|
|
278
|
+
height={actionSize}
|
|
279
|
+
width={actionSize}
|
|
280
|
+
path={onItemClicked}
|
|
281
|
+
dataTestId="list-entry-action"
|
|
282
|
+
/>
|
|
283
|
+
) : (
|
|
284
|
+
<Button
|
|
285
|
+
icon={IconName.ChevronRight}
|
|
286
|
+
height={actionSize}
|
|
287
|
+
width={actionSize}
|
|
288
|
+
onButtonClicked={onItemClicked as () => void}
|
|
289
|
+
dataTestId="list-entry-action"
|
|
290
|
+
/>
|
|
291
|
+
))}
|
|
287
292
|
</div>
|
|
288
293
|
)}
|
|
289
294
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PageHeaderActionProps } from './PageHeaderAction/PageHeaderAction.model';
|
|
2
|
+
|
|
3
|
+
export interface PageHeaderProps {
|
|
4
|
+
/** Title shown in page header */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Subtitle shown in page header */
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** Array of actions to be rendered. (default: []) */
|
|
9
|
+
actions?: PageHeaderActionProps[];
|
|
10
|
+
/** Array of Bulk Actions to be rendered. If populated, Bulk Actions will become available. (default: []) */
|
|
11
|
+
bulkActions?: PageHeaderActionProps[];
|
|
12
|
+
/** Whether or bulk actions are shown by default. (default: false) */
|
|
13
|
+
openBulkActionsOnStart?: boolean;
|
|
14
|
+
/** Whether or not bulk actions are disabled (default: false)*/
|
|
15
|
+
bulkActionsDisabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Callback to emit when Bulk Actions is toggled
|
|
18
|
+
* The expanded state is supplied as an argument
|
|
19
|
+
*/
|
|
20
|
+
onBulkActionsToggled?: (expanded: boolean) => void;
|
|
21
|
+
/** CSS Class name for additional styles */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
@@ -5,7 +5,8 @@ import { PageHeader } from './PageHeader';
|
|
|
5
5
|
import {
|
|
6
6
|
PageHeaderActionProps,
|
|
7
7
|
PageHeaderActionType,
|
|
8
|
-
} from './PageHeaderAction
|
|
8
|
+
} from './PageHeaderAction';
|
|
9
|
+
import {} from './PageHeaderAction/PageHeaderAction';
|
|
9
10
|
|
|
10
11
|
const headerActions: PageHeaderActionProps[] = [
|
|
11
12
|
{
|
|
@@ -2,35 +2,11 @@ import clsx from 'clsx';
|
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { noop } from '../../helpers/utils';
|
|
4
4
|
import { useWindowSize } from '../../hooks/useWindowSize/useWindowSize';
|
|
5
|
+
import { PageHeaderProps } from './PageHeader.model';
|
|
5
6
|
import classes from './PageHeader.scss';
|
|
6
|
-
import {
|
|
7
|
-
PageHeaderAction,
|
|
8
|
-
PageHeaderActionProps,
|
|
9
|
-
} from './PageHeaderAction/PageHeaderAction';
|
|
7
|
+
import { PageHeaderAction } from './PageHeaderAction/PageHeaderAction';
|
|
10
8
|
import { PageHeaderBulkActions } from './PageHeaderBulkActions/PageHeaderBulkActions';
|
|
11
9
|
|
|
12
|
-
export interface PageHeaderProps {
|
|
13
|
-
/** Title shown in page header */
|
|
14
|
-
title?: string;
|
|
15
|
-
/** Subtitle shown in page header */
|
|
16
|
-
subtitle?: string;
|
|
17
|
-
/** Array of actions to be rendered. (default: []) */
|
|
18
|
-
actions?: PageHeaderActionProps[];
|
|
19
|
-
/** Array of Bulk Actions to be rendered. If populated, Bulk Actions will become available. (default: []) */
|
|
20
|
-
bulkActions?: PageHeaderActionProps[];
|
|
21
|
-
/** Whether or bulk actions are shown by default. (default: false) */
|
|
22
|
-
openBulkActionsOnStart?: boolean;
|
|
23
|
-
/** Whether or not bulk actions are disabled (default: false)*/
|
|
24
|
-
bulkActionsDisabled?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Callback to emit when Bulk Actions is toggled
|
|
27
|
-
* The expanded state is supplied as an argument
|
|
28
|
-
*/
|
|
29
|
-
onBulkActionsToggled?: (expanded: boolean) => void;
|
|
30
|
-
/** CSS Class name for additional styles */
|
|
31
|
-
className?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
10
|
/**
|
|
35
11
|
* Primary header for stations. Accepts a title, subtitle, actions, and bulk actions.
|
|
36
12
|
* @example
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Not } from '../../../types';
|
|
2
|
+
import { IconName } from '../../Icons';
|
|
3
|
+
import { ConfirmAction, DefaultHandler, LinkAction } from '../../models';
|
|
4
|
+
|
|
5
|
+
export enum PageHeaderActionType {
|
|
6
|
+
Active,
|
|
7
|
+
Context,
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated This value is no longer necessary for navigation type actions in the
|
|
10
|
+
* `PageHeaderAction` component, and will be removed in the future.
|
|
11
|
+
* To create a navigation link, use the `path` property instead of the `onClick` handler,
|
|
12
|
+
* which will automatically generate an anchor element.
|
|
13
|
+
* @note This deprecation only affects the `Navigation` enum value in the PageHeaderActionType
|
|
14
|
+
*/
|
|
15
|
+
Navigation,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type PageHeaderActionProps =
|
|
19
|
+
| PageHeaderJsActionProps
|
|
20
|
+
| PageHeaderNavigationActionProps;
|
|
21
|
+
|
|
22
|
+
export interface PageHeaderJsActionProps
|
|
23
|
+
extends BaseActionOptions,
|
|
24
|
+
HandledAction,
|
|
25
|
+
ConfirmAction,
|
|
26
|
+
Not<LinkAction> {
|
|
27
|
+
/**
|
|
28
|
+
* Whether the action is an 'Active' or 'Context' type.
|
|
29
|
+
* Changes the background color to the corresponding action type. (default: 'Context')
|
|
30
|
+
* Type `Navigation` is deprecated and will be removed in the future
|
|
31
|
+
* define instead of `onClick` handler `path` property to render element with anchor tag
|
|
32
|
+
*/
|
|
33
|
+
actionType?: PageHeaderActionType;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface PageHeaderNavigationActionProps
|
|
37
|
+
extends BaseActionOptions,
|
|
38
|
+
LinkAction,
|
|
39
|
+
Not<ConfirmAction>,
|
|
40
|
+
Not<HandledAction> {}
|
|
41
|
+
|
|
42
|
+
interface HandledAction {
|
|
43
|
+
/**
|
|
44
|
+
* Callback to emit when a user clicks on the component
|
|
45
|
+
*/
|
|
46
|
+
onClick: DefaultHandler;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface BaseActionOptions {
|
|
50
|
+
/** The label of the action. */
|
|
51
|
+
label: string;
|
|
52
|
+
/** Optional built in icon. This prop also accepts an img src. */
|
|
53
|
+
icon?: IconName | string;
|
|
54
|
+
/** Optional image alt attribute. */
|
|
55
|
+
imgAlt?: string;
|
|
56
|
+
/** Whether the action is disabled. If set to true, disallows interactions. (default: undefined) */
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/** Optional class */
|
|
59
|
+
className?: string;
|
|
60
|
+
}
|