Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat: Adding calls to custom style hooks derived from context.",
"packageName": "@fluentui/react-text",
"email": "[email protected]",
"dependentChangeType": "patch"
}
3 changes: 2 additions & 1 deletion packages/react-components/react-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"@fluentui/scripts-tasks": "*"
},
"dependencies": {
"@griffel/react": "^1.5.2",
"@fluentui/react-shared-contexts": "^9.3.0",
"@fluentui/react-theme": "^9.1.5",
"@griffel/react": "^1.5.2",
"@fluentui/react-utilities": "^9.7.0",
"tslib": "^2.1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { renderText_unstable } from './renderText';
import { useTextStyles_unstable } from './useTextStyles';
import type { TextProps } from './Text.types';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';

/**
* Typography and styling abstraction component used to ensure consistency of text.
Expand All @@ -13,6 +14,9 @@ export const Text: ForwardRefComponent<TextProps> = React.forwardRef((props, ref

useTextStyles_unstable(state);

const { useTextStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();
useCustomStyles(state);

return renderText_unstable(state);
// Work around some small mismatches in inferred types which don't matter in practice
}) as ForwardRefComponent<TextProps>;
Expand Down