Skip to content

Commit

Permalink
chore(react-card): adopt custom JSX pragma (#27606)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus authored Apr 18, 2023
1 parent b495179 commit 2c2438a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: adopt custom JSX pragma",
"packageName": "@fluentui/react-card",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions packages/react-components/react-card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@fluentui/react-tabster": "^9.6.5",
"@fluentui/react-theme": "^9.1.7",
"@fluentui/react-utilities": "^9.8.0",
"@fluentui/react-jsx-runtime": "9.0.0-alpha.1",
"@griffel/react": "^1.5.2",
"@swc/helpers": "^0.4.14"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
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 { CardContextValue, CardSlots, CardState } from './Card.types';
import { CardProvider } from './CardContext';

/**
* Render the final JSX of Card.
*/
export const renderCard_unstable = (state: CardState, cardContextValue: CardContextValue) => {
const { slots, slotProps } = getSlots<CardSlots>(state);
const { slots, slotProps } = getSlotsNext<CardSlots>(state);

return (
<slots.root {...slotProps.root}>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { CardFooterSlots, CardFooterState } from './CardFooter.types';

/**
* Render the final JSX of CardFooter.
*/
export const renderCardFooter_unstable = (state: CardFooterState) => {
const { slots, slotProps } = getSlots<CardFooterSlots>(state);
const { slots, slotProps } = getSlotsNext<CardFooterSlots>(state);

return (
<slots.root {...slotProps.root}>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { CardHeaderSlots, CardHeaderState } from './CardHeader.types';

/**
* Render the final JSX of CardHeader.
*/
export const renderCardHeader_unstable = (state: CardHeaderState) => {
const { slots, slotProps } = getSlots<CardHeaderSlots>(state);
const { slots, slotProps } = getSlotsNext<CardHeaderSlots>(state);

return (
<slots.root {...slotProps.root}>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { CardPreviewSlots, CardPreviewState } from './CardPreview.types';

/**
* Render the final JSX of CardPreview.
*/
export const renderCardPreview_unstable = (state: CardPreviewState) => {
const { slots, slotProps } = getSlots<CardPreviewSlots>(state);
const { slots, slotProps } = getSlotsNext<CardPreviewSlots>(state);

return (
<slots.root {...slotProps.root}>
Expand Down

0 comments on commit 2c2438a

Please sign in to comment.