Skip to content

Commit

Permalink
feat(esl-toggleable): add jsx tag shape
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Aug 13, 2021
1 parent 2b36fae commit d583f24
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/esl-toggleable/core.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export type {ESLToggleableShape} from './core/esl-toggleable.shape';
export type {ESLToggleableDispatcherShape} from './core/esl-toggleable-dispatcher.shape';
export * from './core/esl-toggleable';
export * from './core/esl-toggleable-dispatcher';
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Tag declaration interface of {@link ESLToggleableDispatcher} element
* Used for JSX declaration
*/
export interface ESLToggleableDispatcherShape {
/** Allowed children */
children: [];
}
34 changes: 34 additions & 0 deletions src/modules/esl-toggleable/core/esl-toggleable.shape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Tag declaration interface of {@link ESLToggleable} element
* Used for JSX declaration
*/
export interface ESLToggleableShape {
/** Define CSS class to add on the body element */
'body-class'?: string;
/** Define CSS class to add when the Toggleable is active */
'active-class'?: string;

/** Define Toggleable group meta information to organize groups */
'group-name'?: string;

/** Define selector to mark inner close triggers */
'close-trigger'?: string;

/** Enable close the Toggleable on ESC keyboard event */
'close-on-esc'?: boolean;
/** Enable close the Toggleable on a click/tap outside */
'close-on-outside-action'?: boolean;

/** Define selector of inner target element to place aria attributes */
'a11y-target'?: string;

/** Define JSON of initial params to pass to show/hide action on the start */
'initial-params'?: string | number;
/** Define JSON of default params to merge into passed action params */
'default-params'?: string | number;
/** Define JSON of hover params to pass from track hover listener */
'track-hover-params'?: string | number;

/** Allowed children */
children: any[];
}

0 comments on commit d583f24

Please sign in to comment.