primevue-mirror/api-generator/components/togglebutton.js

134 lines
3.2 KiB
JavaScript
Raw Normal View History

const ToggleButtonProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'any',
default: 'null',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'onIcon',
type: 'string',
default: 'null',
description: 'Icon for the on state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'offIcon',
type: 'string',
default: 'null',
description: 'Icon for the off state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'onLabel',
type: 'string',
default: 'yes',
description: 'Label for the on state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'offLabel',
type: 'string',
default: 'no',
description: 'Label for the off state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'iconPos',
type: 'string',
default: 'left',
description: 'Position of the icon, valid values are "left" and "right".'
},
{
2022-09-14 14:26:41 +00:00
name: 'tabindex',
type: 'number',
default: 'null',
description: 'Index of the element in tabbing order.'
},
{
2022-09-14 14:26:41 +00:00
name: 'disabled',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the element should be disabled.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputId',
type: 'string',
default: 'null',
description: 'Identifier of the focus input to match a label defined for the chips.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputClass',
type: 'string | object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Style class of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputStyle',
type: 'object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Inline style of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputProps',
type: 'object',
default: 'null',
description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
2023-05-08 12:18:27 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
const ToggleButtonEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'change',
description: 'Callback to invoke on value change.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'focus',
description: 'Callback to invoke when the component receives focus.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'blur',
description: 'Callback to invoke when the component loses focus.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
}
];
2023-04-18 13:42:36 +00:00
const ToggleButtonSlots = [
{
name: 'icon',
description: 'custom icon template.'
}
];
module.exports = {
togglebutton: {
2022-09-14 14:26:41 +00:00
name: 'ToggleButton',
description: 'ToggleButton is used to select a boolean value using a button.',
props: ToggleButtonProps,
2023-04-18 13:42:36 +00:00
slots: ToggleButtonSlots,
events: ToggleButtonEvents
}
};