Skip to content

Commit e4dace1

Browse files
authored
Merge pull request #2075 from Shopify/fix-primaryAction-on-Page
Fixing type on primaryAction
2 parents 04688b6 + 82f11a1 commit e4dace1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

UNRELEASED.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
77
### Documentation
88

99
- Fixed paths to images in the “Attention badge” example
10+
11+
### Bug fixes
12+
13+
- Fixed the page component's primary action to support `LoadableAction`s and `DisableableAction`s

src/components/Page/types.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import {
22
ActionListItemDescriptor,
3-
BaseAction,
43
IconableAction,
54
DisableableAction,
65
BadgeAction,
6+
LoadableAction,
7+
DestructableAction,
78
} from '../../types';
89
import {PaginationDescriptor} from '../Pagination';
910
import {Props as BreadcrumbProps} from '../Breadcrumbs';
@@ -36,11 +37,12 @@ export interface ActionProps {
3637
hasIndicator?: boolean;
3738
}
3839

39-
export interface PrimaryActionProps extends BaseAction {
40+
export interface PrimaryActionProps
41+
extends DisableableAction,
42+
LoadableAction,
43+
DestructableAction {
4044
/** Provides extra visual weight and identifies the primary action in a set of buttons */
4145
primary?: boolean;
42-
/** Indicates a dangerous or potentially negative action */
43-
destructive?: boolean;
4446
}
4547

4648
export interface HeaderProps {

0 commit comments

Comments
 (0)