Skip to content

Commit

Permalink
feat(esl-panel): 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 d583f24 commit ba00085
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/esl-panel/core.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export type {ESLPanelShape} from './core/esl-panel.shape';
export type {ESLPanelGroupShape} from './core/esl-panel-group.shape';

export * from './core/esl-panel';
export * from './core/esl-panel-group';
26 changes: 26 additions & 0 deletions src/modules/esl-panel/core/esl-panel-group.shape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Tag declaration interface of {@link ESLPanelGroup} element
* Used for JSX declaration
*/
export interface ESLPanelGroupShape {
/**
* Define rendering mode of the component (takes values from the list of supported modes; 'accordion' by default)
* Supported values: `accordion|tabs|open`
*/
'mode'?: string;

/** Define element {@link TraversingQuery} selector to add class that identifies the rendering mode (ESLPanelGroup itself by default) */
'mode-cls-target'?: string;

/** Define class(es) to be added during animation ('animate' by default) */
'animation-class'?: string;

/** Define time to clear animation common params (max-height style + classes) ('auto' by default) */
'fallback-duration'?: string | number;

/** Define a list of comma-separated "modes" to disable collapse/expand animation (for both Group and Panel animations)*/
'no-collapse'?: string;

/** Allowed children */
children: any[];
}
17 changes: 17 additions & 0 deletions src/modules/esl-panel/core/esl-panel.shape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type {ESLToggleableShape} from '../../esl-toggleable/core/esl-toggleable.shape';

/**
* Tag declaration interface of {@link ESLPanel} element
* Used for JSX declaration
*/
export interface ESLPanelShape extends ESLToggleableShape {
/** Define class(es) to be added for active state ('open' by default) */
'active-class'?: string;
/** Define class(es) to be added during animation ('animate' by default) */
'animate-class'?: string;
/** Define class(es) to be added during animation after next render ('post-animate' by default) */
'post-animate-class'?: string;

/** Define time to clear animation common params (max-height style + classes) ('auto' by default) */
'fallback-duration'?: string | number;
}

0 comments on commit ba00085

Please sign in to comment.