@ownclouders/design-system
Version:
ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components
48 lines (47 loc) • 1.99 kB
TypeScript
import { Recipient } from '../../helpers';
/**
* @component OcRecipient
* @description A component that displays a recipient's avatar, icon, or name with optional appendable content.
*
* @props {Object} recipient - The recipient object containing details to render.
* @props {string} recipient.name - The name of the recipient.
* @props {string} [recipient.avatar] - The URL of the recipient's avatar image.
* @props {boolean} [recipient.hasAvatar] - Indicates if the recipient has an avatar.
* @props {boolean} [recipient.isLoadingAvatar] - Indicates if the avatar is currently loading.
* @props {Object} [recipient.icon] - The icon object for the recipient.
* @props {string} recipient.icon.name - The name of the icon to display.
* @props {string} [recipient.icon.label] - The accessible label for the icon.
*
* @slot append - Slot for appending additional content (e.g., actions or extra information).
*
* @example
* <OcRecipient
* :recipient="{
* name: 'John Doe',
* avatar: 'https://example.com/avatar.jpg',
* hasAvatar: true,
* isLoadingAvatar: false,
* icon: { name: 'user', label: 'User Icon' }
* }"
* />
*/
interface Props {
recipient: Recipient;
}
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
append?(_: {}): any;
};
refs: {};
rootEl: HTMLSpanElement;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};