Skip to content

Commit c8a4c67

Browse files
authored
Export interfaces BasicDropdownSignature, BasicDropdownArgs and BasicDropdownDefaultBlock (#945)
* Export BasicDropdownSignature and BasicDropdownArgs for BasicDropdown component * Export default block as own interface
1 parent af1a118 commit c8a4c67

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

ember-basic-dropdown/src/components/basic-dropdown.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface DropdownActions {
2626
registerDropdownElement: (e: HTMLElement) => void;
2727
getTriggerElement: () => HTMLElement | null;
2828
}
29+
2930
export interface Dropdown {
3031
uniqueId: string;
3132
disabled: boolean;
@@ -37,24 +38,25 @@ export type TRootEventType = 'click' | 'mousedown';
3738

3839
const UNINITIALIZED = {};
3940
const IGNORED_STYLES = ['top', 'left', 'right', 'width', 'height'];
40-
interface BasicDropdownSignature {
41+
42+
export interface BasicDropdownDefaultBlock {
43+
uniqueId: string;
44+
disabled: boolean;
45+
isOpen: boolean;
46+
actions: DropdownActions;
47+
Trigger: ComponentLike<BasicDropdownTriggerSignature>;
48+
Content: ComponentLike<BasicDropdownContentSignature>;
49+
}
50+
51+
export interface BasicDropdownSignature {
4152
Element: HTMLElement;
4253
Args: BasicDropdownArgs;
4354
Blocks: {
44-
default: [
45-
{
46-
uniqueId: string;
47-
disabled: boolean;
48-
isOpen: boolean;
49-
actions: DropdownActions;
50-
Trigger: ComponentLike<BasicDropdownTriggerSignature>;
51-
Content: ComponentLike<BasicDropdownContentSignature>;
52-
},
53-
];
55+
default: [BasicDropdownDefaultBlock];
5456
};
5557
}
5658

57-
interface BasicDropdownArgs {
59+
export interface BasicDropdownArgs {
5860
initiallyOpened?: boolean;
5961
renderInPlace?: boolean;
6062
verticalPosition?: VerticalPosition;

0 commit comments

Comments
 (0)