Skip to content

Commit

Permalink
Adding theme check for dark mode (microsoft#33454)
Browse files Browse the repository at this point in the history
  • Loading branch information
srmukher authored Dec 12, 2024
1 parent 1d7eae2 commit 2332070
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Adding theme check for dark mode for declarative charts",
"packageName": "@fluentui/react-charting",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { useTheme } from '@fluentui/react';

export const UseIsDarkTheme = (): boolean => {
const theme = useTheme();
return theme.isInverted;
return theme?.isInverted ?? false;
};

export interface Schema {
Expand Down

0 comments on commit 2332070

Please sign in to comment.