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-image",
"email": "[email protected]",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions packages/react-components/react-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"dependencies": {
"@griffel/react": "^1.5.2",
"@fluentui/react-shared-contexts": "^9.3.0",
"@fluentui/react-utilities": "^9.7.0",
"@fluentui/react-theme": "^9.1.5",
"tslib": "^2.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ import { useImage_unstable } from './useImage';
import { useImageStyles_unstable } from './useImageStyles';
import type { ImageProps } from './Image.types';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';

/**
* The Image component ensures the consistent styling of images.
*/
export const Image: ForwardRefComponent<ImageProps> = React.forwardRef((props, ref) => {
const state = useImage_unstable(props, ref);

useImageStyles_unstable(state);

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

return renderImage_unstable(state);
});

Expand Down