
Highlighter is autolocked, so we shouldn't show the lock icon ### Change Type - [x] `patch` — Bug fix [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - We no longer show the tool lock option for highlighter - it didn't do anything anyway
491 lines
5.7 KiB
Text
491 lines
5.7 KiB
Text
---
|
|
title: DropdownMenu
|
|
status: published
|
|
category: ui
|
|
group: Namespace
|
|
author: api
|
|
date: 06/23/2023
|
|
order: 5
|
|
---<Small>None Namespace</Small>
|
|
|
|
<details>
|
|
<summary>Table of Contents</summary>
|
|
- [Methods](#methods)
|
|
- [CheckboxItem](#DropdownMenu-CheckboxItem-function-1)
|
|
- [Content](#DropdownMenu-Content-function-1)
|
|
- [Group](#DropdownMenu-Group-function-1)
|
|
- [Indicator](#DropdownMenu-Indicator-function-1)
|
|
- [Item](#DropdownMenu-Item-function-1)
|
|
- [RadioItem](#DropdownMenu-RadioItem-function-1)
|
|
- [Root](#DropdownMenu-Root-function-1)
|
|
- [Sub](#DropdownMenu-Sub-function-1)
|
|
- [SubContent](#DropdownMenu-SubContent-function-1)
|
|
- [SubTrigger](#DropdownMenu-SubTrigger-function-1)
|
|
- [Trigger](#DropdownMenu-Trigger-function-1)
|
|
</details>
|
|
|
|
##### Signature
|
|
|
|
|
|
```ts
|
|
|
|
```
|
|
|
|
---
|
|
|
|
## Methods
|
|
|
|
### `CheckboxItem` \{#DropdownMenu-CheckboxItem-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ children, onSelect, ...rest }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
DropdownMenuCheckboxItemProps
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
##### References
|
|
|
|
[DropdownMenuCheckboxItemProps](/gen/ui/DropdownMenu-DropdownMenuCheckboxItemProps-interface)
|
|
|
|
---
|
|
|
|
### `Content` \{#DropdownMenu-Content-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ side, align, sideOffset, alignOffset, children, }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
children: any
|
|
alignOffset?: number
|
|
sideOffset?: number
|
|
align?: 'center' | 'end' | 'start'
|
|
side?: 'bottom' | 'left' | 'right' | 'top'
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|
|
### `Group` \{#DropdownMenu-Group-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ children, size, }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
children: any
|
|
size?: 'medium' | 'small' | 'tiny' | 'wide'
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|
|
### `Indicator` \{#DropdownMenu-Indicator-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
None
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|
|
### `Item` \{#DropdownMenu-Item-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ noClose, ...props }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
DropdownMenuItemProps
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
##### References
|
|
|
|
[DropdownMenuItemProps](/gen/ui/DropdownMenu-DropdownMenuItemProps-interface)
|
|
|
|
---
|
|
|
|
### `RadioItem` \{#DropdownMenu-RadioItem-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ children, onSelect, ...rest }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
DropdownMenuCheckboxItemProps
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
##### References
|
|
|
|
[DropdownMenuCheckboxItemProps](/gen/ui/DropdownMenu-DropdownMenuCheckboxItemProps-interface)
|
|
|
|
---
|
|
|
|
### `Root` \{#DropdownMenu-Root-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ id, children, modal, }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
id: string
|
|
children: any
|
|
modal?: boolean
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|
|
### `Sub` \{#DropdownMenu-Sub-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ id, children }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
id: string
|
|
children: any
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|
|
### `SubContent` \{#DropdownMenu-SubContent-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ alignOffset, sideOffset, children, }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
alignOffset?: number
|
|
sideOffset?: number
|
|
children: any
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|
|
### `SubTrigger` \{#DropdownMenu-SubTrigger-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ label, 'data-testid': testId, 'data-direction': dataDirection, }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
label: TLUiTranslationKey
|
|
'data-testid'?: string
|
|
'data-direction'?: 'left' | 'right'
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
##### References
|
|
|
|
[TLUiTranslationKey](/gen/ui/TLUiTranslationKey-type)
|
|
|
|
---
|
|
|
|
### `Trigger` \{#DropdownMenu-Trigger-function-1}
|
|
|
|
<Small>Public Function</Small>
|
|
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
<ParametersTable>
|
|
|
|
<ParametersTableRow>
|
|
<ParametersTableName>
|
|
|
|
`{ children, 'data-testid': testId, }`
|
|
|
|
</ParametersTableName>
|
|
<ParametersTableDescription>
|
|
|
|
```ts
|
|
{
|
|
children: any
|
|
'data-testid'?: string
|
|
}
|
|
```
|
|
|
|
|
|
|
|
</ParametersTableDescription>
|
|
</ParametersTableRow>
|
|
</ParametersTable>
|
|
|
|
##### Returns
|
|
|
|
|
|
```ts
|
|
JSX.Element
|
|
```
|
|
|
|
---
|
|
|