diff --git a/packages/react/src/components/DescriptionList/DescriptionList.figma.tsx b/packages/react/src/components/DescriptionList/DescriptionList.figma.tsx new file mode 100644 index 000000000..362914d56 --- /dev/null +++ b/packages/react/src/components/DescriptionList/DescriptionList.figma.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import figma from '@figma/code-connect'; +import { + DescriptionList, + DescriptionListItem, + DescriptionTerm, + DescriptionDetails +} from '../../index'; + +const FIGMA_URL = + 'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=240-4209&m=dev'; + +figma.connect(DescriptionList, FIGMA_URL, { + props: { + collapsed: figma.enum('Collapsed', { True: true }) + }, + example: ({ collapsed }) => ( + + + Term 1 + Details 1 + + + Term 2 + Details 2 + + + ) +}); diff --git a/packages/react/src/components/NavBar/NavBar.figma.tsx b/packages/react/src/components/NavBar/NavBar.figma.tsx new file mode 100644 index 000000000..1007c5fa1 --- /dev/null +++ b/packages/react/src/components/NavBar/NavBar.figma.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import figma from '@figma/code-connect'; +import { NavBar, NavItem } from '../../index'; + +const FIGMA_URL = + 'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=82-137&m=dev'; + +figma.connect(NavBar, FIGMA_URL, { + example: () => ( + + Home + About + Contact + + ) +}); diff --git a/packages/react/src/components/RadioGroup/RadioGroup.figma.tsx b/packages/react/src/components/RadioGroup/RadioGroup.figma.tsx new file mode 100644 index 000000000..bf0df2654 --- /dev/null +++ b/packages/react/src/components/RadioGroup/RadioGroup.figma.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import figma from '@figma/code-connect'; +import { RadioGroup } from '../../index'; + +const FIGMA_URL = + 'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=231-2042&m=dev'; + +figma.connect(RadioGroup, FIGMA_URL, { + example: () => ( + + ) +}); diff --git a/packages/react/src/components/Tabs/Tabs.figma.tsx b/packages/react/src/components/Tabs/Tabs.figma.tsx new file mode 100644 index 000000000..8391af018 --- /dev/null +++ b/packages/react/src/components/Tabs/Tabs.figma.tsx @@ -0,0 +1,43 @@ +import React, { useRef } from 'react'; +import figma from '@figma/code-connect'; +import { Tabs, Tab, TabPanel } from '../../index'; + +const TAB_FIGMA_URL = + 'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=259-6525&m=dev'; + +const TAB_PANEL_FIGMA_URL = + 'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=3409-1057&m=dev'; + +figma.connect(Tab, TAB_FIGMA_URL, { + example: () => { + const panelOneRef = useRef(null); + const panelTwoRef = useRef(null); + return ( + <> + + Tab 1 + Tab 2 + + Panel 1 content + Panel 2 content + + ); + } +}); + +figma.connect(TabPanel, TAB_PANEL_FIGMA_URL, { + example: () => { + const panelOneRef = useRef(null); + const panelTwoRef = useRef(null); + return ( + <> + + Tab 1 + Tab 2 + + Panel 1 content + Panel 2 content + + ); + } +}); diff --git a/packages/react/src/components/TopBar/TopBar.figma.tsx b/packages/react/src/components/TopBar/TopBar.figma.tsx new file mode 100644 index 000000000..718ed46b0 --- /dev/null +++ b/packages/react/src/components/TopBar/TopBar.figma.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import figma from '@figma/code-connect'; +import { TopBar, TopBarItem, TopBarTrigger } from '../../index'; + +const FIGMA_URL = + 'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=515-2774&m=dev'; + +figma.connect(TopBar, FIGMA_URL, { + example: () => ( + + Home + About + Menu + + ) +});