mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
Refactor #3879 - For Avatar & AvatarGroup
This commit is contained in:
parent
69d0f98f26
commit
43c3f82ae5
6 changed files with 131 additions and 9 deletions
44
components/lib/avatar/Avatar.d.ts
vendored
44
components/lib/avatar/Avatar.d.ts
vendored
|
@ -9,6 +9,45 @@
|
|||
import { VNode } from 'vue';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export declare type AvatarPassThroughOptionType = AvatarPassThroughAttributes | ((options: AvatarPassThroughMethodOptions) => AvatarPassThroughAttributes) | null | undefined;
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) option method.
|
||||
*/
|
||||
export interface AvatarPassThroughMethodOptions {
|
||||
props: AvatarProps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough attributes for each DOM elements
|
||||
*/
|
||||
export interface AvatarPassThroughAttributes {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) options.
|
||||
* @see {@link AvatarProps.pt}
|
||||
*/
|
||||
export interface AvatarPassThroughOptions {
|
||||
/**
|
||||
* Uses to pass attributes to the root's DOM element.
|
||||
*/
|
||||
root?: AvatarPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the label's DOM element.
|
||||
*/
|
||||
label?: AvatarPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the icon's DOM element.
|
||||
*/
|
||||
icon?: AvatarPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the image's DOM element.
|
||||
*/
|
||||
image?: AvatarPassThroughOptionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines valid properties in Avatar component.
|
||||
*/
|
||||
|
@ -44,6 +83,11 @@ export interface AvatarProps {
|
|||
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
||||
*/
|
||||
'aria-labelledby'?: string | undefined;
|
||||
/**
|
||||
* Uses to pass attributes to DOM elements inside the component.
|
||||
* @type {AvatarPassThroughOptions}
|
||||
*/
|
||||
pt?: AvatarPassThroughOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue