Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figma Code Connect #95

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add nested children to Dropdown menu figma spec
  • Loading branch information
corbanbrook committed Dec 19, 2024
commit 2079fff1bad64f823739f2c9bdd4617833d65819
36 changes: 30 additions & 6 deletions src/components/DropdownMenu/DropdownMenu.figma.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import React from "react"
import { DropdownMenuRoot } from "./DropdownMenu"
import figma from "@figma/code-connect"
import figma from '@figma/code-connect'
import React from 'react'

import { ContextMenuIcon } from '../../icons'
import { IconButton } from '../IconButton'

import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuRoot,
DropdownMenuTrigger,
} from './DropdownMenu'

/**
* -- This file was auto-generated by Code Connect --
Expand All @@ -12,7 +21,7 @@ import figma from "@figma/code-connect"

figma.connect(
DropdownMenuRoot,
"https://www.figma.com/design/0OB1JVXSqaxmJDrP7qAMJr?node-id=11510%3A28005",
'https://www.figma.com/design/0OB1JVXSqaxmJDrP7qAMJr?node-id=11510%3A28005',
{
props: {
// No matching props could be found for these Figma properties:
Expand All @@ -22,6 +31,21 @@ figma.connect(
// "inverted": "inverted"
// })
},
example: (props) => <DropdownMenuRoot />,
},
example: props => (
<DropdownMenuRoot>
<DropdownMenuRoot>
<DropdownMenuTrigger asChild>
<IconButton icon={ContextMenuIcon} />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Item 1</DropdownMenuItem>
<DropdownMenuItem>Item 2</DropdownMenuItem>
<DropdownMenuItem>Item 3</DropdownMenuItem>
<DropdownMenuItem>Item 4</DropdownMenuItem>
<DropdownMenuItem>Item 5</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenuRoot>
</DropdownMenuRoot>
),
}
)