@scania/tegel
Version:
Tegel Design System
14 lines (13 loc) • 662 B
TypeScript
import { Attributes } from '../types/Attributes';
/**
* Elements inside of web components sometimes need to inherit global attributes
* set on the host. For example, the inner input in `ion-input` should inherit
* the `title` attribute that developers set directly on `ion-input`. This
* helper function should be called in componentWillLoad and assigned to a variable
* that is later used in the render function.
*
* This does not need to be reactive as changing attributes on the host element
* does not trigger a re-render.
*/
declare const inheritAttributes: (el: HTMLElement, attributes?: string[]) => Attributes;
export default inheritAttributes;