diff --git a/change/@fluentui-react-tabs-7068398a-7522-4df1-9dfe-0313fae2c8e6.json b/change/@fluentui-react-tabs-7068398a-7522-4df1-9dfe-0313fae2c8e6.json new file mode 100644 index 00000000000000..c000268e5abddf --- /dev/null +++ b/change/@fluentui-react-tabs-7068398a-7522-4df1-9dfe-0313fae2c8e6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: adopts custom JSX pragma", + "packageName": "@fluentui/react-tabs", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-tabs/package.json b/packages/react-components/react-tabs/package.json index 609865be66d04a..a2f5c578fb80f1 100644 --- a/packages/react-components/react-tabs/package.json +++ b/packages/react-components/react-tabs/package.json @@ -32,6 +32,7 @@ }, "dependencies": { "@fluentui/react-context-selector": "^9.1.18", + "@fluentui/react-jsx-runtime": "9.0.0-alpha.1", "@fluentui/react-shared-contexts": "^9.3.3", "@fluentui/react-tabster": "^9.6.5", "@fluentui/react-theme": "^9.1.7", diff --git a/packages/react-components/react-tabs/src/components/Tab/renderTab.tsx b/packages/react-components/react-tabs/src/components/Tab/renderTab.tsx index 3d8b88ad1f0c42..69b8fb66dd273d 100644 --- a/packages/react-components/react-tabs/src/components/Tab/renderTab.tsx +++ b/packages/react-components/react-tabs/src/components/Tab/renderTab.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 { TabState, TabSlots } from './Tab.types'; /** * Render the final JSX of Tab */ export const renderTab_unstable = (state: TabState) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return ( diff --git a/packages/react-components/react-tabs/src/components/TabList/renderTabList.tsx b/packages/react-components/react-tabs/src/components/TabList/renderTabList.tsx index ee1358846d6cee..876814d147b188 100644 --- a/packages/react-components/react-tabs/src/components/TabList/renderTabList.tsx +++ b/packages/react-components/react-tabs/src/components/TabList/renderTabList.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 { TabListState, TabListSlots, TabListContextValues } from './TabList.types'; import { TabListProvider } from './TabListContext'; @@ -7,7 +10,7 @@ import { TabListProvider } from './TabListContext'; * Render the final JSX of TabList */ export const renderTabList_unstable = (state: TabListState, contextValues: TabListContextValues) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return (