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

Commit df9b713

Browse files
committed
update dropdown option to option
1 parent 9ad01ce commit df9b713

File tree

5 files changed

+19
-26
lines changed

5 files changed

+19
-26
lines changed

docs/api-report.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,24 @@ export class Dropdown extends Select {
8383
}
8484

8585
// @public
86-
export class DropdownOption extends ListboxOption {
87-
// @internal
88-
connectedCallback(): void;
89-
}
86+
export type DropdownOptions = SelectOptions;
9087

9188
// @public
92-
export type DropdownOptionOptions = ListboxOptionOptions;
89+
export class Link extends Anchor {
90+
}
9391

9492
// @public
95-
export type DropdownOptions = SelectOptions;
93+
export type LinkOptions = AnchorOptions;
9694

9795
// @public
98-
export class Link extends Anchor {
96+
class Option_2 extends ListboxOption {
97+
// @internal
98+
connectedCallback(): void;
9999
}
100+
export { Option_2 as Option }
100101

101102
// @public
102-
export type LinkOptions = AnchorOptions;
103+
export type OptionOptions = ListboxOptionOptions;
103104

104105
// @public
105106
export class Panels extends Tabs {

src/custom-elements.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,12 @@ import {vsCodeTextField} from './text-field/index';
2727
import type {Badge} from './badge/index';
2828
import type {Button} from './button/index';
2929
import type {Checkbox} from './checkbox/index';
30-
import type {
31-
DataGrid,
32-
DataGridCell,
33-
DataGridRow,
34-
} from './data-grid/index';
30+
import type {DataGrid, DataGridCell, DataGridRow} from './data-grid/index';
3531
import type {Divider} from './divider/index';
3632
import type {Dropdown} from './dropdown/index';
3733
import type {Link} from './link/index';
38-
import type {DropdownOption} from './option/index';
39-
import type {
40-
Panels,
41-
PanelTab,
42-
PanelView,
43-
} from './panels/index';
34+
import type {Option} from './option/index';
35+
import type {Panels, PanelTab, PanelView} from './panels/index';
4436
import type {ProgressRing} from './progress-ring/index';
4537
import type {RadioGroup} from './radio-group/index';
4638
import type {Radio} from './radio/index';

src/option/fixtures/createOption.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
import {DropdownOption} from '../index';
4+
import {Option} from '../index';
55

66
export type OptionArgs = {
77
label: string;
@@ -10,7 +10,7 @@ export type OptionArgs = {
1010
};
1111

1212
export function createOption({label, isDisabled, isSelected}: OptionArgs) {
13-
const option = new DropdownOption();
13+
const option = new Option();
1414

1515
if (label) {
1616
option.textContent = label;

src/option/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import {optionStyles as styles} from './option.styles';
1212
* Dropdown option configuration options
1313
* @public
1414
*/
15-
export type DropdownOptionOptions = ListboxOptionOptions;
15+
export type OptionOptions = ListboxOptionOptions;
1616

1717
/**
1818
* The Visual Studio Code option class.
1919
*
2020
* @public
2121
*/
22-
export class DropdownOption extends FoundationListboxOption {
22+
export class Option extends FoundationListboxOption {
2323
/**
2424
* Component lifecycle method that runs when the component is inserted
2525
* into the DOM.
@@ -45,7 +45,7 @@ export class DropdownOption extends FoundationListboxOption {
4545
*
4646
* @public
4747
*/
48-
export const vsCodeOption = DropdownOption.compose<DropdownOptionOptions>({
48+
export const vsCodeOption = Option.compose<OptionOptions>({
4949
baseName: 'option',
5050
template,
5151
styles,

src/option/option.styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import {
2020
typeRampBaseFontSize,
2121
typeRampBaseLineHeight,
2222
} from '../design-tokens';
23-
import {DropdownOptionOptions} from './';
23+
import {OptionOptions} from './';
2424

2525
export const optionStyles = (
2626
context: ElementDefinitionContext,
27-
definition: DropdownOptionOptions
27+
definition: OptionOptions
2828
) => css`
2929
${display('inline-flex')} :host {
3030
font-family: var(--body-font);

0 commit comments

Comments
 (0)