-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(react-accordion): adopt custom JSX pragma
- Loading branch information
1 parent
391878b
commit 7500393
Showing
6 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-accordion-0886e6c0-bf89-457f-a6c6-d81ecd0afd83.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-accordion", | ||
"email": "bernardo.sunderhus@gmail.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...ges/react-components/react-accordion/src/components/AccordionItem/renderAccordionItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...s/react-components/react-accordion/src/components/AccordionPanel/renderAccordionPanel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +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 { AccordionPanelState, AccordionPanelSlots } from './AccordionPanel.types'; | ||
|
||
/** | ||
* Function that renders the final JSX of the component | ||
*/ | ||
export const renderAccordionPanel_unstable = (state: AccordionPanelState) => { | ||
const { slots, slotProps } = getSlots<AccordionPanelSlots>(state); | ||
const { slots, slotProps } = getSlotsNext<AccordionPanelSlots>(state); | ||
return state.open ? <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root> : null; | ||
}; |