From beb8a060e11cef0984217fc3e84ea5545af16b6e Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Dec 2021 16:32:52 +0300 Subject: [PATCH] Fixed #1836 - For Divider --- src/components/divider/Divider.d.ts | 61 +++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/src/components/divider/Divider.d.ts b/src/components/divider/Divider.d.ts index 903495184..5fe92e18e 100644 --- a/src/components/divider/Divider.d.ts +++ b/src/components/divider/Divider.d.ts @@ -1,16 +1,61 @@ import { VNode } from 'vue'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -interface DividerProps { - align?: string; - layout?: string; - type?: string; +type DividerHorizontalAlignType = 'left' | 'center' | 'right'; + +type DividerVerticalAlignType = 'top' | 'center' | 'bottom'; + +type DividerAlignType = DividerHorizontalAlignType | DividerVerticalAlignType | undefined; + +type DividerLayoutType = 'horizontal' | 'vertical'; + +type DividerType = 'solid' | 'dashed' | 'dotted'; + +export interface DividerProps { + /** + * Alignment of the content, options are "left", "center", "right" for horizontal layout and "top", "center", "bottom" for vertical. + * @see DividerAlignType + */ + align?: DividerAlignType; + /** + * Specifies the orientation, valid values are "horizontal" and "vertical". + * @see DividerLayoutType + * Default value is 'horizontal'. + */ + layout?: DividerLayoutType; + /** + * Border style type. + * @see DividerType + * Default value is 'solid'. + */ + type?: DividerType; } -declare class Divider { - $props: DividerProps; - $slots: { - '': VNode[]; +export interface DividerSlots { + /** + * Default content slot. + */ + default: () => VNode[]; +} + +export declare type DividerEmits = { +} + +declare class Divider extends ClassComponent { } + +declare module '@vue/runtime-core' { + interface GlobalComponents { + Divider: GlobalComponentConstructor } } +/** + * + * Divider is used to separate contents. + * + * Demos: + * + * - [Divider](https://www.primefaces.org/primevue/showcase/#/divider) + * + */ export default Divider;