mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3797 - Splitter updates
This commit is contained in:
parent
094245e2d3
commit
c14c2f160e
6 changed files with 115 additions and 4 deletions
32
components/lib/splitterpanel/SplitterPanel.d.ts
vendored
32
components/lib/splitterpanel/SplitterPanel.d.ts
vendored
|
@ -10,6 +10,33 @@
|
|||
import { VNode } from 'vue';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export declare type SplitterPanelPassThroughOptionType = SplitterPanelPassThroughAttributes | ((options: SplitterPanelPassThroughMethodOptions) => SplitterPanelPassThroughAttributes) | null | undefined;
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) option method.
|
||||
*/
|
||||
export interface SplitterPanelPassThroughMethodOptions {
|
||||
props: SplitterPanelProps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) options.
|
||||
* @see {@link PanelProps.pt}
|
||||
*/
|
||||
export interface SplitterPanelPassThroughOptions {
|
||||
/**
|
||||
* Uses to pass attributes to the root's DOM element.
|
||||
*/
|
||||
root?: SplitterPanelPassThroughOptionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough attributes for each DOM elements
|
||||
*/
|
||||
export interface SplitterPanelPassThroughAttributes {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines valid properties in SplitterPanel component.
|
||||
*/
|
||||
|
@ -22,6 +49,11 @@ export interface SplitterPanelProps {
|
|||
* Minimum size of the element relative to 100%.
|
||||
*/
|
||||
minSize?: number | undefined;
|
||||
/**
|
||||
* Uses to pass attributes to DOM elements inside the component.
|
||||
* @type {SplitterPanelPassThroughOptions}
|
||||
*/
|
||||
pt?: SplitterPanelPassThroughOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<template>
|
||||
<div ref="container" :class="containerClass">
|
||||
<div ref="container" :class="containerClass" v-bind="ptm('root')">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComponentBase from 'primevue/base';
|
||||
|
||||
export default {
|
||||
name: 'SplitterPanel',
|
||||
extends: ComponentBase,
|
||||
props: {
|
||||
size: {
|
||||
type: Number,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue