You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(flow): split up custom flow item interfaces (#7666)
**Related Issue:** #7608
## Summary
Splits up interfaces for custom flow item class and elements.
This also updates the conventions doc with info on interface usage.
Copy file name to clipboardExpand all lines: packages/calcite-components/conventions/README.md
+45-9Lines changed: 45 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -419,15 +419,51 @@ For such cases, the following pattern will enable developers to create custom ch
419
419
#### Parent component
420
420
421
421
- Must provide a `customItemSelectors` property to allow querying for custom elements in addition to their expected children.
422
-
- An interface for `HTML<ChildComponentItem>Element` must be created in the parent's `interfaces.d.ts` file, where the necessary child APIs must be extracted.
423
-
**`parent/interfaces.d.ts`**
424
-
```ts
425
-
type ChildComponentLike = Pick<HTMLCalciteChildElement, "required"|"props"|"from"|"parent">&HTMLElement;
- An interface for the class (used by custom item classes) and element (used by parent component APIs) must be created in the parent's `interfaces.d.ts` file, where the necessary child APIs must be extracted.
423
+
424
+
**Example**
425
+
426
+
**`parent/interfaces.d.ts`**
427
+
428
+
```ts
429
+
type ChildComponentLike = Pick<Components.CalciteChild, "required"|"props"|"from"|"parent">;
430
+
type ChildComponentLikeElement = ChilcComponentLike &HTMLElement;
0 commit comments