-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherrypicking react-button changes from 7.0 into master (#15961)
* Merging with latest. * updating change file versions.
- Loading branch information
Showing
35 changed files
with
174 additions
and
129 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
change/@fluentui-react-avatar-2020-10-13-12-47-23-fix-button-hooks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Updating useStatus and useAvatar to return state only, exporting render functions separately.", | ||
"packageName": "@fluentui/react-avatar", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch", | ||
"date": "2020-10-13T19:47:23.741Z" | ||
} |
8 changes: 8 additions & 0 deletions
8
change/@fluentui-react-button-2020-10-12-18-23-32-fix-button-hooks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Updating button hooks to return state only; render function should be imported separately.", | ||
"packageName": "@fluentui/react-button", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch", | ||
"date": "2020-10-13T01:23:22.018Z" | ||
} |
8 changes: 8 additions & 0 deletions
8
change/@fluentui-react-compose-2020-10-12-18-23-32-fix-button-hooks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Updating the README example in compose/next.", | ||
"packageName": "@fluentui/react-compose", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch", | ||
"date": "2020-10-13T01:23:32.010Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './Avatar.types'; | ||
export * from './useAvatar'; | ||
export * from './Avatar'; | ||
export * from './renderAvatar'; | ||
export * from './useAvatar'; |
15 changes: 15 additions & 0 deletions
15
packages/react-avatar/src/components/Avatar/renderAvatar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as React from 'react'; | ||
import { getSlots } from '@fluentui/react-compose/lib/next/index'; | ||
import { AvatarState } from './Avatar.types'; | ||
import { avatarShorthandProps } from './useAvatar'; | ||
|
||
export const renderAvatar = (state: AvatarState) => { | ||
const { slots, slotProps } = getSlots(state, avatarShorthandProps); | ||
return ( | ||
<slots.root {...slotProps.root}> | ||
<slots.label {...slotProps.label} /> | ||
<slots.image {...slotProps.image} /> | ||
<slots.badge {...slotProps.badge} /> | ||
</slots.root> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './Badge.types'; | ||
export * from './useBadge'; | ||
export * from './Badge'; | ||
export * from './renderBadge'; | ||
export * from './useBadge'; | ||
export * from './useBadge'; |
13 changes: 13 additions & 0 deletions
13
packages/react-avatar/src/components/Badge/renderBadge.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as React from 'react'; | ||
import { BadgeState } from './Badge.types'; | ||
import { getSlots } from '@fluentui/react-compose/lib/next/index'; | ||
import { badgeShorthandProps } from './useBadge'; | ||
|
||
export const renderBadge = (state: BadgeState) => { | ||
const { slots, slotProps } = getSlots(state, badgeShorthandProps); | ||
return ( | ||
<slots.root {...slotProps.root}> | ||
<slots.icon {...slotProps.icon} /> | ||
</slots.root> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './Image.types'; | ||
export * from './useImage'; | ||
export * from './Image'; | ||
export * from './renderImage'; | ||
export * from './useImage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import * as React from 'react'; | ||
import { ImageState } from './Image.types'; | ||
import { getSlots } from '@fluentui/react-compose/lib/next/index'; | ||
|
||
export const renderImage = (state: ImageState) => { | ||
const { slots, slotProps } = getSlots(state); | ||
return <slots.root {...slotProps.root} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export * from './Button.types'; | ||
export * from './useButtonClasses'; | ||
export * from './Button'; | ||
export * from './renderButton'; | ||
export * from './useButton'; | ||
export * from './useButtonClasses'; | ||
export * from './useButtonState'; | ||
export * from './Button'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './CompoundButton'; | ||
export * from './CompoundButton.types'; | ||
export * from './CompoundButton'; | ||
export * from './renderCompoundButton'; | ||
export * from './useCompoundButton'; | ||
export * from './useCompoundButtonClasses'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.