From 260ac568f9c0951eace934293d2986133626e094 Mon Sep 17 00:00:00 2001 From: Bernardo Sunderhus Date: Tue, 18 Apr 2023 10:16:04 +0000 Subject: [PATCH] chore(react-spinner): adopt custom JSX pragma --- ...t-spinner-33b862af-f85f-49a3-8cb9-46efd6771481.json | 7 +++++++ packages/react-components/react-spinner/package.json | 1 + .../src/components/Spinner/renderSpinner.tsx | 10 +++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 change/@fluentui-react-spinner-33b862af-f85f-49a3-8cb9-46efd6771481.json diff --git a/change/@fluentui-react-spinner-33b862af-f85f-49a3-8cb9-46efd6771481.json b/change/@fluentui-react-spinner-33b862af-f85f-49a3-8cb9-46efd6771481.json new file mode 100644 index 0000000000000..c72d34ea5f626 --- /dev/null +++ b/change/@fluentui-react-spinner-33b862af-f85f-49a3-8cb9-46efd6771481.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: adopt custom JSX pragma", + "packageName": "@fluentui/react-spinner", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-spinner/package.json b/packages/react-components/react-spinner/package.json index 8344e99192fd9..bffc75babcf5b 100644 --- a/packages/react-components/react-spinner/package.json +++ b/packages/react-components/react-spinner/package.json @@ -32,6 +32,7 @@ "@fluentui/scripts-tasks": "*" }, "dependencies": { + "@fluentui/react-jsx-runtime": "9.0.0-alpha.1", "@fluentui/react-label": "^9.1.9", "@fluentui/react-shared-contexts": "^9.3.3", "@fluentui/react-theme": "^9.1.7", diff --git a/packages/react-components/react-spinner/src/components/Spinner/renderSpinner.tsx b/packages/react-components/react-spinner/src/components/Spinner/renderSpinner.tsx index bd84097faaa08..e3a24a960e455 100644 --- a/packages/react-components/react-spinner/src/components/Spinner/renderSpinner.tsx +++ b/packages/react-components/react-spinner/src/components/Spinner/renderSpinner.tsx @@ -1,12 +1,16 @@ -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 { SpinnerState, SpinnerSlots } from './Spinner.types'; /** * Render the final JSX of Spinner */ export const renderSpinner_unstable = (state: SpinnerState) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); const { labelPosition } = state; return (