Skip to content

Commit f6c6e84

Browse files
Merge pull request #2007 from Shopify/revert-1994-non-primary-primaryaction
Revert "[Page] Give primaryAction more Button variants"
2 parents 1016e15 + 26054ec commit f6c6e84

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ The format is based on [these versioning and changelog guidelines][changelog-gui
66

77
<!-- ## Unreleased -->
88

9-
### Enhancements
10-
11-
- Updated the page component's primary action to support `Button` props. ([#1994](https://github.com/Shopify/polaris-react/pull/1994))
12-
139
## 2.6.1 - 2018-08-21
1410

1511
### Development workflow

src/components/Page/components/Header/Header.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,9 @@ export default class Header extends React.PureComponent<Props, State> {
5252
const breadcrumbMarkup =
5353
breadcrumbs.length > 0 ? <Breadcrumbs breadcrumbs={breadcrumbs} /> : null;
5454

55-
const primary =
56-
primaryAction &&
57-
(primaryAction.primary === undefined ? true : primaryAction.primary);
58-
5955
const primaryActionMarkup = primaryAction ? (
6056
<div className={styles.PrimaryAction}>
61-
{buttonsFrom(primaryAction, {primary})}
57+
{buttonsFrom(primaryAction, {primary: true})}
6258
</div>
6359
) : null;
6460

src/components/Page/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import {
22
ActionListItemDescriptor,
3-
Action,
43
IconableAction,
54
DisableableAction,
5+
LoadableAction,
66
BadgeAction,
77
} from '../../types';
88
import {PaginationDescriptor} from '../Pagination';
99
import {Props as BreadcrumbProps} from '../Breadcrumbs';
10-
import {Props as ButtonProps} from '../Button';
1110

1211
export type SecondaryAction = IconableAction & DisableableAction;
1312

@@ -53,7 +52,7 @@ export interface HeaderProps {
5352
/** Collection of page-level groups of secondary actions */
5453
actionGroups?: ActionGroup[];
5554
/** Primary page-level action */
56-
primaryAction?: Action & ButtonProps;
55+
primaryAction?: DisableableAction & LoadableAction;
5756
/** Page-level pagination */
5857
pagination?: PaginationDescriptor;
5958
}

0 commit comments

Comments
 (0)