Skip to content

Commit

Permalink
fix(esl-footnotes): shape to support TSX is missing in module
Browse files Browse the repository at this point in the history
  • Loading branch information
dshovchko committed Jul 25, 2023
1 parent a921763 commit fd8cd07
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/modules/esl-footnotes/core/esl-footnotes.shape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type {ESLBaseElementShape} from '../../esl-base-element/core/esl-base-element.shape';
import type {ESLFootnotes} from './esl-footnotes';

/**
* Tag declaration interface of ESL Footnotes element
* Used for TSX declaration
*/
export interface ESLFootnotesTagShape extends ESLBaseElementShape<ESLFootnotes> {
/** Label for 'return to note' button title */
'back-to-note-label'?: string;

/** Grouping note instances with identical content enable/disable */
'grouping'?: string;

/** Target element {@link ESLTraversingQuery} to define scope */
'scope-target'?: string;

/** Children are not allowed for ESLShare */
children?: never[];
}

declare global {
namespace JSX {
export interface IntrinsicElements {
/** {@link ESLFootnotes} custom tag */
'esl-footnotes': ESLFootnotesTagShape;
}
}
}
40 changes: 40 additions & 0 deletions src/modules/esl-footnotes/core/esl-note.shape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import type {ESLBaseElementShape} from '../../esl-base-element/core/esl-base-element.shape';
import type {ESLNote} from './esl-note';

/**
* Tag declaration interface of ESL Note element
* Used for TSX declaration
*/
export interface ESLNoteTagShape extends ESLBaseElementShape<ESLNote> {
/** Target to container element {@link ESLTraversingQuery} to define bounds of tooltip visibility (window by default) */
'container'?: string;

/** Media query to specify that footnotes must ignore this note. Default: `not all` */
'ignore'?: string;

/** Tooltip content */
'html'?: string;

/**
* Note label in stand-alone mode (detached from footnotes),
* in the connected state it is a numeric index that is calculated automatically
*/
'standalone-label'?: string;

/** Define click event tracking media query */
'track-click'?: boolean | string;
/** Define hover event tracking media query */
'track-hover'?: boolean | string;

/** Allowed children */
children?: any;
}

declare global {
namespace JSX {
export interface IntrinsicElements {
/** {@link ESLNote} custom tag */
'esl-note': ESLNoteTagShape;
}
}
}

0 comments on commit fd8cd07

Please sign in to comment.