Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
Add docs for how to label a dropdown component (#429)
Browse files Browse the repository at this point in the history
Description of changes

Adds a documentation code snippet demonstrating how to add a label to a dropdown component.
  • Loading branch information
hawkticehurst authored Dec 8, 2022
1 parent aa83544 commit b53584b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dropdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ The `vscode-dropdown` component must be used with the `vscode-option` component.
</vscode-dropdown>
```

### With Label

```html
<label for="my-dropdown">Choose an option:</label>
<vscode-dropdown id="my-dropdown">
<vscode-option>Option Label #1</vscode-option>
<vscode-option>Option Label #2</vscode-option>
<vscode-option>Option Label #3</vscode-option>
</vscode-dropdown>
```

### Disabled Attribute

[Interactive Storybook Example](https://microsoft.github.io/vscode-webview-ui-toolkit/?path=/story/library-dropdown--with-disabled)
Expand Down

0 comments on commit b53584b

Please sign in to comment.