Skip to content

Commit

Permalink
update dropdown option to option
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdholt committed Oct 21, 2021
1 parent 9ad01ce commit df9b713
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 26 deletions.
17 changes: 9 additions & 8 deletions docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,24 @@ export class Dropdown extends Select {
}

// @public
export class DropdownOption extends ListboxOption {
// @internal
connectedCallback(): void;
}
export type DropdownOptions = SelectOptions;

// @public
export type DropdownOptionOptions = ListboxOptionOptions;
export class Link extends Anchor {
}

// @public
export type DropdownOptions = SelectOptions;
export type LinkOptions = AnchorOptions;

// @public
export class Link extends Anchor {
class Option_2 extends ListboxOption {
// @internal
connectedCallback(): void;
}
export { Option_2 as Option }

// @public
export type LinkOptions = AnchorOptions;
export type OptionOptions = ListboxOptionOptions;

// @public
export class Panels extends Tabs {
Expand Down
14 changes: 3 additions & 11 deletions src/custom-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,12 @@ import {vsCodeTextField} from './text-field/index';
import type {Badge} from './badge/index';
import type {Button} from './button/index';
import type {Checkbox} from './checkbox/index';
import type {
DataGrid,
DataGridCell,
DataGridRow,
} from './data-grid/index';
import type {DataGrid, DataGridCell, DataGridRow} from './data-grid/index';
import type {Divider} from './divider/index';
import type {Dropdown} from './dropdown/index';
import type {Link} from './link/index';
import type {DropdownOption} from './option/index';
import type {
Panels,
PanelTab,
PanelView,
} from './panels/index';
import type {Option} from './option/index';
import type {Panels, PanelTab, PanelView} from './panels/index';
import type {ProgressRing} from './progress-ring/index';
import type {RadioGroup} from './radio-group/index';
import type {Radio} from './radio/index';
Expand Down
4 changes: 2 additions & 2 deletions src/option/fixtures/createOption.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import {DropdownOption} from '../index';
import {Option} from '../index';

export type OptionArgs = {
label: string;
Expand All @@ -10,7 +10,7 @@ export type OptionArgs = {
};

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

if (label) {
option.textContent = label;
Expand Down
6 changes: 3 additions & 3 deletions src/option/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import {optionStyles as styles} from './option.styles';
* Dropdown option configuration options
* @public
*/
export type DropdownOptionOptions = ListboxOptionOptions;
export type OptionOptions = ListboxOptionOptions;

/**
* The Visual Studio Code option class.
*
* @public
*/
export class DropdownOption extends FoundationListboxOption {
export class Option extends FoundationListboxOption {
/**
* Component lifecycle method that runs when the component is inserted
* into the DOM.
Expand All @@ -45,7 +45,7 @@ export class DropdownOption extends FoundationListboxOption {
*
* @public
*/
export const vsCodeOption = DropdownOption.compose<DropdownOptionOptions>({
export const vsCodeOption = Option.compose<OptionOptions>({
baseName: 'option',
template,
styles,
Expand Down
4 changes: 2 additions & 2 deletions src/option/option.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import {
typeRampBaseFontSize,
typeRampBaseLineHeight,
} from '../design-tokens';
import {DropdownOptionOptions} from './';
import {OptionOptions} from './';

export const optionStyles = (
context: ElementDefinitionContext,
definition: DropdownOptionOptions
definition: OptionOptions
) => css`
${display('inline-flex')} :host {
font-family: var(--body-font);
Expand Down

0 comments on commit df9b713

Please sign in to comment.