Skip to content

Commit

Permalink
feat: adopt custom JSX pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus committed Apr 14, 2023
1 parent d2f17a3 commit 89f5d1e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "feat: adopt custom JSX pragma",
"packageName": "@fluentui/react-provider",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions packages/react-components/react-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@fluentui/react-tabster": "^9.6.4",
"@fluentui/react-theme": "^9.1.7",
"@fluentui/react-utilities": "^9.7.4",
"@fluentui/react-jsx-runtime": "^9.0.0-alpha.0",
"@swc/helpers": "^0.4.14"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import * as React from 'react';
/* eslint-disable jsdoc/check-tag-names */
/** @jsxRuntime classic */
/** @jsx createElement */
/* eslint-enable jsdoc/check-tag-names */

import { createElement } from '@fluentui/react-jsx-runtime';
import { canUseDOM, getSlotsNext } from '@fluentui/react-utilities';
import { TextDirectionProvider } from '@griffel/react';
import {
OverridesProvider_unstable as OverridesProvider,
Expand All @@ -9,7 +15,6 @@ import {
CustomStyleHooksProvider_unstable as CustomStyleHooksProvider,
CustomStyleHooksContextValue_unstable as CustomStyleHooksContextValue,
} from '@fluentui/react-shared-contexts';
import { canUseDOM, getSlots } from '@fluentui/react-utilities';
import type { FluentProviderContextValues, FluentProviderState, FluentProviderSlots } from './FluentProvider.types';

/**
Expand All @@ -19,7 +24,7 @@ export const renderFluentProvider_unstable = (
state: FluentProviderState,
contextValues: FluentProviderContextValues,
) => {
const { slots, slotProps } = getSlots<FluentProviderSlots>(state);
const { slots, slotProps } = getSlotsNext<FluentProviderSlots>(state);

// Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable
// instead of FluentProviderContextValues.customStyleHooks_unstable and thinks it is
Expand Down

0 comments on commit 89f5d1e

Please sign in to comment.