diff --git a/change/@fluentui-react-toolbar-5faad9ba-f6d4-4d75-8d1d-6066eb81e377.json b/change/@fluentui-react-toolbar-5faad9ba-f6d4-4d75-8d1d-6066eb81e377.json new file mode 100644 index 00000000000000..709f95b23de391 --- /dev/null +++ b/change/@fluentui-react-toolbar-5faad9ba-f6d4-4d75-8d1d-6066eb81e377.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: adopt custom JSX pragma", + "packageName": "@fluentui/react-toolbar", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-toolbar/package.json b/packages/react-components/react-toolbar/package.json index 54e154b04fc216..31c558436549da 100644 --- a/packages/react-components/react-toolbar/package.json +++ b/packages/react-components/react-toolbar/package.json @@ -38,6 +38,7 @@ "@fluentui/react-divider": "^9.2.8", "@fluentui/react-theme": "^9.1.7", "@fluentui/react-utilities": "^9.7.4", + "@fluentui/react-jsx-runtime": "^9.0.0-alpha.0", "@fluentui/react-context-selector": "^9.1.17", "@fluentui/react-radio": "^9.1.9", "@fluentui/react-shared-contexts": "^9.3.3", diff --git a/packages/react-components/react-toolbar/src/components/Toolbar/renderToolbar.tsx b/packages/react-components/react-toolbar/src/components/Toolbar/renderToolbar.tsx index 1a955b2c07acdf..3469bdedb3c325 100644 --- a/packages/react-components/react-toolbar/src/components/Toolbar/renderToolbar.tsx +++ b/packages/react-components/react-toolbar/src/components/Toolbar/renderToolbar.tsx @@ -1,5 +1,8 @@ -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 type { ToolbarState, ToolbarSlots, ToolbarContextValues } from './Toolbar.types'; import { ToolbarContext } from './ToolbarContext'; @@ -7,7 +10,7 @@ import { ToolbarContext } from './ToolbarContext'; * Render the final JSX of Toolbar */ export const renderToolbar_unstable = (state: ToolbarState, contextValues: ToolbarContextValues) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return ( diff --git a/packages/react-components/react-toolbar/src/components/ToolbarGroup/renderToolbarGroup.tsx b/packages/react-components/react-toolbar/src/components/ToolbarGroup/renderToolbarGroup.tsx index a22cadc5243f9e..c214791df476cc 100644 --- a/packages/react-components/react-toolbar/src/components/ToolbarGroup/renderToolbarGroup.tsx +++ b/packages/react-components/react-toolbar/src/components/ToolbarGroup/renderToolbarGroup.tsx @@ -1,12 +1,15 @@ -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 type { ToolbarGroupState, ToolbarGroupSlots } from './ToolbarGroup.types'; /** * Render the final JSX of ToolbarGroup */ export const renderToolbarGroup_unstable = (state: ToolbarGroupState) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return {slotProps.root.children}; };