Skip to content
Merged
Changes from all commits
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
16 changes: 10 additions & 6 deletions ember-basic-dropdown/src/components/basic-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ export interface Dropdown {
const UNINITIALIZED = {};
const IGNORED_STYLES = ['top', 'left', 'right', 'width', 'height'];

interface Args {
interface BasicDropdownSignature {
Element: HTMLElement;
Args: BasicDropdownArgs;
Blocks: {
default: [api: Dropdown];
};
}

interface BasicDropdownArgs {
initiallyOpened?: boolean;
renderInPlace?: boolean;
verticalPosition?: string;
Expand All @@ -54,9 +61,6 @@ interface Args {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
contentComponent: string | ComponentLike<any>;
calculatePosition?: CalculatePosition;
Blocks: {
default: [api: Dropdown];
};
}

type RepositionChanges = {
Expand All @@ -70,7 +74,7 @@ type RepositionChanges = {
height?: string | undefined;
};

export default class BasicDropdown extends Component<Args> {
export default class BasicDropdown extends Component<BasicDropdownSignature> {
@tracked hPosition: string | null = null;
@tracked vPosition: string | null = null;
@tracked top: string | undefined;
Expand Down Expand Up @@ -138,7 +142,7 @@ export default class BasicDropdown extends Component<Args> {
}

// Lifecycle hooks
constructor(owner: Owner, args: Args) {
constructor(owner: Owner, args: BasicDropdownArgs) {
super(owner, args);
if (this.args.onInit) {
this.args.onInit(this.publicAPI);
Expand Down