File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ 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+
913## 2.6.1 - 2018-08-21
1014
1115### Development workflow
Original file line number Diff line number Diff line change @@ -52,9 +52,13 @@ 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+
5559 const primaryActionMarkup = primaryAction ? (
5660 < div className = { styles . PrimaryAction } >
57- { buttonsFrom ( primaryAction , { primary : true } ) }
61+ { buttonsFrom ( primaryAction , { primary} ) }
5862 </ div >
5963 ) : null ;
6064
Original file line number Diff line number Diff line change 11import {
22 ActionListItemDescriptor ,
3+ Action ,
34 IconableAction ,
45 DisableableAction ,
5- LoadableAction ,
66 BadgeAction ,
77} from '../../types' ;
88import { PaginationDescriptor } from '../Pagination' ;
99import { Props as BreadcrumbProps } from '../Breadcrumbs' ;
10+ import { Props as ButtonProps } from '../Button' ;
1011
1112export type SecondaryAction = IconableAction & DisableableAction ;
1213
@@ -52,7 +53,7 @@ export interface HeaderProps {
5253 /** Collection of page-level groups of secondary actions */
5354 actionGroups ?: ActionGroup [ ] ;
5455 /** Primary page-level action */
55- primaryAction ?: DisableableAction & LoadableAction ;
56+ primaryAction ?: Action & ButtonProps ;
5657 /** Page-level pagination */
5758 pagination ?: PaginationDescriptor ;
5859}
You can’t perform that action at this time.
0 commit comments