Skip to content

Commit

Permalink
PivotItem: Fixing typing error in headerButtonProps (#13550)
Browse files Browse the repository at this point in the history
#### Pull request checklist

- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using `$ yarn change`

#### Description of changes

#13128 aimed to expand the typings of `headerButtonProps` to accept `IButtonProps` but there was a bug in the type introduced. This PR fixes that bug.

#### Focus areas to test

(optional)
  • Loading branch information
khmakoto committed Jun 11, 2020
1 parent 8b0ffa8 commit e9b2826
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "PivotItem: Fixing typing error in headerButtonProps.",
"packageName": "@fluentui/react-next",
"email": "humbertomakotomorimoto@gmail.com",
"dependentChangeType": "patch",
"date": "2020-06-10T21:14:47.890Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minor",
"comment": "PivotItem: Fixing typing error in headerButtonProps.",
"packageName": "office-ui-fabric-react",
"email": "humbertomakotomorimoto@gmail.com",
"dependentChangeType": "patch",
"date": "2020-06-10T21:10:47.119Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6283,7 +6283,7 @@ export interface IPivotItemProps extends React.HTMLAttributes<HTMLDivElement> {
alwaysRender?: boolean;
ariaLabel?: string;
componentRef?: IRefObject<{}>;
headerButtonProps?: IButtonProps & {
headerButtonProps?: IButtonProps | {
[key: string]: string | number | boolean;
};
headerText?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface IPivotItemProps extends React.HTMLAttributes<HTMLDivElement> {
* Props for the header command button. This provides a way to pass in native props, such as data-* and aria-*,
* for each pivot header/link element.
*/
headerButtonProps?: IButtonProps & { [key: string]: string | number | boolean };
headerButtonProps?: IButtonProps | { [key: string]: string | number | boolean };

/**
* An required key to uniquely identify a pivot item.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-next/etc/react-next.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export interface IPivotItemProps extends React.HTMLAttributes<HTMLDivElement> {
alwaysRender?: boolean;
ariaLabel?: string;
componentRef?: IRefObject<{}>;
headerButtonProps?: IButtonProps & {
headerButtonProps?: IButtonProps | {
[key: string]: string | number | boolean;
};
headerText?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface IPivotItemProps extends React.HTMLAttributes<HTMLDivElement> {
* Props for the header command button. This provides a way to pass in native props, such as data-* and aria-*,
* for each pivot header/link element.
*/
headerButtonProps?: IButtonProps & { [key: string]: string | number | boolean };
headerButtonProps?: IButtonProps | { [key: string]: string | number | boolean };

/**
* An required key to uniquely identify a pivot item.
Expand Down

0 comments on commit e9b2826

Please sign in to comment.