diff --git a/change/@fluentui-react-image-73bfeece-0ada-4257-894e-dec72d7fa021.json b/change/@fluentui-react-image-73bfeece-0ada-4257-894e-dec72d7fa021.json new file mode 100644 index 0000000000000..2d96d22d0ea0b --- /dev/null +++ b/change/@fluentui-react-image-73bfeece-0ada-4257-894e-dec72d7fa021.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: adopt custom JSX pragma", + "packageName": "@fluentui/react-image", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-image/package.json b/packages/react-components/react-image/package.json index fac5b8ce2512d..645af32fd53be 100644 --- a/packages/react-components/react-image/package.json +++ b/packages/react-components/react-image/package.json @@ -35,6 +35,7 @@ "@griffel/react": "^1.5.2", "@fluentui/react-shared-contexts": "^9.3.3", "@fluentui/react-utilities": "^9.8.0", + "@fluentui/react-jsx-runtime": "9.0.0-alpha.1", "@fluentui/react-theme": "^9.1.7", "@swc/helpers": "^0.4.14" }, diff --git a/packages/react-components/react-image/src/components/Image/renderImage.tsx b/packages/react-components/react-image/src/components/Image/renderImage.tsx index 1e11216329f06..5c2fb35584216 100644 --- a/packages/react-components/react-image/src/components/Image/renderImage.tsx +++ b/packages/react-components/react-image/src/components/Image/renderImage.tsx @@ -1,5 +1,9 @@ -import * as React from 'react'; -import { getSlots } from '@fluentui/react-utilities'; +/** @jsxRuntime classic */ +/** @jsx createElement */ + +import { createElement } from '@fluentui/react-jsx-runtime'; + +import { getSlotsNext } from '@fluentui/react-utilities'; import { ImageSlots, ImageState } from './Image.types'; /** @@ -7,7 +11,7 @@ import { ImageSlots, ImageState } from './Image.types'; * Given the state of an image, renders it. */ export const renderImage_unstable = (state: ImageState) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return ; };