-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Remove useTheme export #23335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
spmonahan
merged 8 commits into
microsoft:master
from
levithomason:feat/remove-use-theme
May 31, 2022
Merged
Remove useTheme export #23335
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ab21383
remove useTheme from exports
levithomason 1de032a
run yarn change
levithomason 055a4a2
Merge branch 'master' into feat/remove-use-theme
levithomason 4fad6fc
fix bad merge
levithomason 8d46b09
fix type export
spmonahan 0ce98c4
remove export useTheme
levithomason 89145a6
update react-provider change json
levithomason 6ad5978
update react-provider api snapshot
spmonahan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-provider-182c6453-86ce-4b31-acb3-68451895c741.json
This file contains hidden or 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,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "remove export useTheme", | ||
| "packageName": "@fluentui/react-provider", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-shared-contexts-a94194e5-8e1a-4632-874e-39ceecf4e79f.json
This file contains hidden or 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,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "remove useTheme from exports", | ||
| "packageName": "@fluentui/react-shared-contexts", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
6 changes: 2 additions & 4 deletions
6
packages/react-components/react-shared-contexts/src/ThemeContext/ThemeContext.ts
This file contains hidden or 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,8 +1,6 @@ | ||
| import * as React from 'react'; | ||
| import type { Theme } from '@fluentui/react-theme'; | ||
|
|
||
| export const ThemeContext = React.createContext<Theme | Partial<Theme> | undefined>(undefined); | ||
| export type ThemeContextValue = Theme | Partial<Theme> | undefined; | ||
|
|
||
| export function useTheme(): Theme | Partial<Theme> | undefined { | ||
| return React.useContext(ThemeContext); | ||
| } | ||
| export const ThemeContext = React.createContext<ThemeContextValue>(undefined); |
This file contains hidden or 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 { ThemeContext, useTheme } from './ThemeContext'; | ||
| export { ThemeContext } from './ThemeContext'; | ||
| export type { ThemeContextValue } from './ThemeContext'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in #23325 we are moving react-shared-contexts to unstable. Does this have any effect on exporting this type from the unstable package? |
||
| export { ThemeClassNameContext, useThemeClassName } from './ThemeClassNameContext'; | ||
| export type { ThemeClassNameContextValue } from './ThemeClassNameContext'; | ||
| export { TooltipContext } from './TooltipContext'; | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were 5 or 6 instances of this specific typing, so I extracted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to the useTheme change?