Skip to content

Commit

Permalink
Export default block as own interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dagroe committed Feb 14, 2025
1 parent f16f7b4 commit e4cdc10
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions ember-basic-dropdown/src/components/basic-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface DropdownActions {
registerDropdownElement: (e: HTMLElement) => void;
getTriggerElement: () => HTMLElement | null;
}

export interface Dropdown {
uniqueId: string;
disabled: boolean;
Expand All @@ -37,20 +38,21 @@ export type TRootEventType = 'click' | 'mousedown';

const UNINITIALIZED = {};
const IGNORED_STYLES = ['top', 'left', 'right', 'width', 'height'];

export interface BasicDropdownDefaultBlock {
uniqueId: string;
disabled: boolean;
isOpen: boolean;
actions: DropdownActions;
Trigger: ComponentLike<BasicDropdownTriggerSignature>;
Content: ComponentLike<BasicDropdownContentSignature>;
}

export interface BasicDropdownSignature {
Element: HTMLElement;
Args: BasicDropdownArgs;
Blocks: {
default: [
{
uniqueId: string;
disabled: boolean;
isOpen: boolean;
actions: DropdownActions;
Trigger: ComponentLike<BasicDropdownTriggerSignature>;
Content: ComponentLike<BasicDropdownContentSignature>;
},
];
default: [BasicDropdownDefaultBlock];
};
}

Expand Down

0 comments on commit e4cdc10

Please sign in to comment.