Skip to content

Commit

Permalink
Export interfaces BasicDropdownSignature, BasicDropdownArgs and `…
Browse files Browse the repository at this point in the history
…BasicDropdownDefaultBlock` (#945)

* Export BasicDropdownSignature and BasicDropdownArgs for BasicDropdown component

* Export default block as own interface
  • Loading branch information
dagroe authored Feb 16, 2025
1 parent af1a118 commit c8a4c67
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 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,24 +38,25 @@ export type TRootEventType = 'click' | 'mousedown';

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

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];
};
}

interface BasicDropdownArgs {
export interface BasicDropdownArgs {
initiallyOpened?: boolean;
renderInPlace?: boolean;
verticalPosition?: VerticalPosition;
Expand Down

0 comments on commit c8a4c67

Please sign in to comment.