Divider pt updates
parent
917b09a67b
commit
49fc4462e4
|
@ -16,6 +16,12 @@ const DividerProps = [
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'solid',
|
default: 'solid',
|
||||||
description: 'Border style type, default is "solid" and other options are "dashed" and "dotted".'
|
description: 'Border style type, default is "solid" and other options are "dashed" and "dotted".'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pt',
|
||||||
|
type: 'any',
|
||||||
|
default: 'null',
|
||||||
|
description: 'Uses to pass attributes to DOM elements inside the component.'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,37 @@
|
||||||
import { VNode } from 'vue';
|
import { VNode } from 'vue';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
|
export declare type DividerPassThroughOptionType = DividerPassThroughAttributes | ((options: DividerPassThroughMethodOptions) => DividerPassThroughAttributes) | null | undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough(pt) option method.
|
||||||
|
*/
|
||||||
|
export interface DividerPassThroughMethodOptions {
|
||||||
|
props: DividerProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough(pt) options.
|
||||||
|
* @see {@link DividerProps.pt}
|
||||||
|
*/
|
||||||
|
export interface DividerPassThroughOptions {
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the root's DOM element.
|
||||||
|
*/
|
||||||
|
root?: DividerPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the content's DOM element.
|
||||||
|
*/
|
||||||
|
content?: DividerPassThroughOptionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough attributes for each DOM elements
|
||||||
|
*/
|
||||||
|
export interface DividerPassThroughAttributes {
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines valid properties in Divider component.
|
* Defines valid properties in Divider component.
|
||||||
*/
|
*/
|
||||||
|
@ -28,6 +59,11 @@ export interface DividerProps {
|
||||||
* @defaultValue solid
|
* @defaultValue solid
|
||||||
*/
|
*/
|
||||||
type?: 'solid' | 'dashed' | 'dotted' | undefined;
|
type?: 'solid' | 'dashed' | 'dotted' | undefined;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to DOM elements inside the component.
|
||||||
|
* @type {DividerPassThroughOptions}
|
||||||
|
*/
|
||||||
|
pt?: DividerPassThroughOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="containerClass" role="separator" :aria-orientation="layout">
|
<div :class="containerClass" role="separator" :aria-orientation="layout" v-bind="ptm('root')">
|
||||||
<div v-if="$slots.default" class="p-divider-content">
|
<div v-if="$slots.default" class="p-divider-content" v-bind="ptm('content')">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ComponentBase from 'primevue/base';
|
||||||
export default {
|
export default {
|
||||||
name: 'Divider',
|
name: 'Divider',
|
||||||
|
extends: ComponentBase,
|
||||||
props: {
|
props: {
|
||||||
align: {
|
align: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
Loading…
Reference in New Issue