Skip to content

Commit

Permalink
chore(react-breadcrumb): adopt custom JSX pragma (microsoft#27604)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus authored and marcosmoura committed Apr 25, 2023
1 parent e34adc5 commit 7b9a420
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/react-components/react-breadcrumb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@fluentui/react-shared-contexts": "^9.3.3",
"@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,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 { BreadcrumbProvider } from './BreadcrumbContext';
import type { BreadcrumbState, BreadcrumbSlots, BreadcrumbContextValues } from './Breadcrumb.types';
/**
* Render the final JSX of Breadcrumb
*/
export const renderBreadcrumb_unstable = (state: BreadcrumbState, contextValues: BreadcrumbContextValues) => {
const { slots, slotProps } = getSlots<BreadcrumbSlots>(state);
const { slots, slotProps } = getSlotsNext<BreadcrumbSlots>(state);
const { root, list } = slotProps;
return (
<slots.root {...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 { BreadcrumbDividerState, BreadcrumbDividerSlots } from './BreadcrumbDivider.types';

/**
* Render the final JSX of BreadcrumbDivider
*/
export const renderBreadcrumbDivider_unstable = (state: BreadcrumbDividerState) => {
const { slots, slotProps } = getSlots<BreadcrumbDividerSlots>(state);
const { slots, slotProps } = getSlotsNext<BreadcrumbDividerSlots>(state);

return <slots.root {...slotProps.root} />;
};
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 { BreadcrumbItemState, BreadcrumbItemSlots } from './BreadcrumbItem.types';

/**
* Render the final JSX of BreadcrumbItem
*/
export const renderBreadcrumbItem_unstable = (state: BreadcrumbItemState) => {
const { slots, slotProps } = getSlots<BreadcrumbItemSlots>(state);
const { slots, slotProps } = getSlotsNext<BreadcrumbItemSlots>(state);

return <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root>;
};
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 { BreadcrumbLinkState, BreadcrumbLinkSlots } from './BreadcrumbLink.types';

/**
* Render the final JSX of BreadcrumbLink
*/
export const renderBreadcrumbLink_unstable = (state: BreadcrumbLinkState) => {
const { slots, slotProps } = getSlots<BreadcrumbLinkSlots>(state);
const { slots, slotProps } = getSlotsNext<BreadcrumbLinkSlots>(state);
const { iconOnly, iconPosition } = state;
return (
<slots.root {...slotProps.root}>
Expand Down

0 comments on commit 7b9a420

Please sign in to comment.