primevue-mirror/packages/primevue/scripts/components/splitter.js

73 lines
1.9 KiB
JavaScript
Raw Normal View History

const SplitterProps = [
{
2022-09-14 14:26:41 +00:00
name: 'layout',
type: 'string',
default: 'horizontal',
description: 'Orientation of the panels, valid values are "horizontal" and "vertical".'
},
{
2022-09-14 14:26:41 +00:00
name: 'gutterSize',
type: 'number',
default: '4',
description: 'Size of the divider in pixels.'
},
{
2022-09-14 14:26:41 +00:00
name: 'stateKey',
type: 'string',
default: 'null',
description: 'Storage identifier of a stateful Splitter.'
},
{
2022-09-14 14:26:41 +00:00
name: 'stateStorage',
type: 'string',
default: 'storage',
description: 'Defines where a stateful splitter keeps its state, valid values are "session" for sessionStorage and "local" for localStorage.'
},
{
2022-09-14 14:26:41 +00:00
name: 'step',
type: 'number',
default: '5',
description: 'Step factor to increment/decrement the size of the panels while pressing the arrow keys.'
2023-03-27 07:13:31 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass attributes to DOM elements inside the component.'
2023-07-06 13:20:37 +00:00
},
{
name: 'unstyled',
type: 'boolean',
default: 'false',
description: 'When enabled, it removes component related styles in the core.'
}
];
const SplitterEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'resizened',
description: 'Callback to invoke when resize ends.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event.originalEvent',
type: 'object',
description: 'Browser event'
},
{
2022-09-14 14:26:41 +00:00
name: 'event.sizes',
type: 'array',
description: 'Sizes of the panels as an array'
}
]
}
];
module.exports = {
splitter: {
2022-09-14 14:26:41 +00:00
name: 'Splitter',
description: 'Splitter is utilized to separate and resize panels',
props: SplitterProps,
events: SplitterEvents
}
};