primevue-mirror/components/lib/card/Card.d.ts

130 lines
2.9 KiB
TypeScript
Raw Normal View History

2023-02-28 14:44:35 +00:00
/**
*
* Card is a flexible container component.
*
* [Live Demo](https://www.primevue.org/card/)
*
* @module card
*
*/
2022-09-06 12:03:37 +00:00
import { VNode } from 'vue';
2023-07-06 11:17:08 +00:00
import { ComponentHooks } from '../basecomponent';
2022-09-06 12:03:37 +00:00
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2023-03-24 13:15:30 +00:00
export declare type CardPassThroughOptionType = CardPassThroughAttributes | null | undefined;
/**
* Custom passthrough(pt) options.
* @see {@link CardProps.pt}
*/
export interface CardPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: CardPassThroughOptionType;
2023-03-31 12:55:51 +00:00
/**
* Uses to pass attributes to the header's DOM element.
*/
header?: CardPassThroughOptionType;
2023-03-24 13:15:30 +00:00
/**
* Uses to pass attributes to the body's DOM element.
*/
body?: CardPassThroughOptionType;
/**
* Uses to pass attributes to the title's DOM element.
*/
title?: CardPassThroughOptionType;
/**
* Uses to pass attributes to the subtitle's DOM element.
*/
subtitle?: CardPassThroughOptionType;
/**
* Uses to pass attributes to the content's DOM element.
*/
content?: CardPassThroughOptionType;
/**
* Uses to pass attributes to the footer's DOM element.
*/
footer?: CardPassThroughOptionType;
2023-07-06 11:09:01 +00:00
/**
* Uses to manage all lifecycle hooks
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
2023-03-24 13:15:30 +00:00
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface CardPassThroughAttributes {
[key: string]: any;
}
2023-03-03 14:16:05 +00:00
/**
* Defines valid properties in Card component.
*/
2023-03-24 13:15:30 +00:00
export interface CardProps {
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {CardPassThroughOptions}
*/
pt?: CardPassThroughOptions;
2023-05-22 22:03:28 +00:00
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
2023-03-24 13:15:30 +00:00
}
2022-09-06 12:03:37 +00:00
2023-03-03 14:16:05 +00:00
/**
* Defines valid slots in Card component.
*/
2022-09-06 12:03:37 +00:00
export interface CardSlots {
/**
* Custom header template.
*/
2023-02-28 14:44:35 +00:00
header(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom title template.
*/
2023-02-28 14:44:35 +00:00
title(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom subtitle template.
*/
2023-02-28 14:44:35 +00:00
subtitle(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom content template.
*/
2023-02-28 14:44:35 +00:00
content(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom footer template.
*/
2023-02-28 14:44:35 +00:00
footer(): VNode[];
2022-09-06 12:03:37 +00:00
}
2023-02-28 14:44:35 +00:00
/**
2023-03-03 14:16:05 +00:00
* Defines valid emits in Card component.
2023-02-28 14:44:35 +00:00
*/
2023-03-03 14:16:05 +00:00
export interface CardEmits {}
2022-09-06 12:03:37 +00:00
2023-02-28 14:44:35 +00:00
/**
* **PrimeVue - Card**
*
* _Card is a flexible container component._
*
* [Live Demo](https://www.primevue.org/card/)
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-02-28 14:44:35 +00:00
*
* @group Component
*/
2023-03-01 12:30:54 +00:00
declare class Card extends ClassComponent<CardProps, CardSlots, CardEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Card: GlobalComponentConstructor<Card>;
2022-09-06 12:03:37 +00:00
}
}
export default Card;