diff --git a/components/lib/avatar/Avatar.d.ts b/components/lib/avatar/Avatar.d.ts index f2efdf1f8..334fd6b20 100644 --- a/components/lib/avatar/Avatar.d.ts +++ b/components/lib/avatar/Avatar.d.ts @@ -7,6 +7,7 @@ * @module avatar */ import { VNode } from 'vue'; +import { AvatarGroupPassThroughOptions } from '../avatargroup'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; export declare type AvatarPassThroughOptionType = AvatarPassThroughAttributes | ((options: AvatarPassThroughMethodOptions) => AvatarPassThroughAttributes) | null | undefined; @@ -16,6 +17,7 @@ export declare type AvatarPassThroughOptionType = AvatarPassThroughAttributes | */ export interface AvatarPassThroughMethodOptions { props: AvatarProps; + parent: AvatarGroupPassThroughOptions; } /** diff --git a/components/lib/avatar/Avatar.vue b/components/lib/avatar/Avatar.vue index 1e8ddbe68..3b3a736d9 100644 --- a/components/lib/avatar/Avatar.vue +++ b/components/lib/avatar/Avatar.vue @@ -1,10 +1,10 @@ @@ -19,6 +19,13 @@ export default { methods: { onError() { this.$emit('error'); + }, + getPTOptions(key) { + return this.ptm(key, { + parent: { + instance: this.$parent + } + }); } } }; diff --git a/components/lib/button/Button.d.ts b/components/lib/button/Button.d.ts index 36795965b..1920665ee 100755 --- a/components/lib/button/Button.d.ts +++ b/components/lib/button/Button.d.ts @@ -17,6 +17,7 @@ export declare type ButtonPassThroughOptionType = ButtonPassThroughAttributes | */ export interface ButtonPassThroughMethodOptions { props: ButtonProps; + context: ButtonContext; } /** @@ -149,6 +150,17 @@ export interface ButtonProps extends ButtonHTMLAttributes { unstyled?: boolean; } +/** + * Defines current options in Button component. + */ +export interface ButtonContext { + /** + * Current disabled state of the element as a boolean. + * @defaultValue false + */ + disabled: boolean; +} + /** * Defines valid slots in Button component. */