2022-09-12 07:13:52 +00:00
|
|
|
const ButtonProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'label',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Text of the button.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'icon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Name of the icon.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'iconPos',
|
|
|
|
type: 'string',
|
|
|
|
default: 'left',
|
2022-09-12 07:13:52 +00:00
|
|
|
description: 'Position of the icon, valid values are "left", "right", "bottom" and "top".'
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'iconClass',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Style class of the icon.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'badge',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Value of the badge.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'badgeClass',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Style class of the badge.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'loading',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Whether the button is in loading state.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'loadingIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'pi pi-spinner pi-spin',
|
|
|
|
description: 'Icon to display in loading state.'
|
2023-03-03 07:03:54 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'link',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a link style to the button.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'severity',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
2024-01-30 12:06:21 +00:00
|
|
|
description: 'Defines the style of the button, valid values are "secondary", "success", "info", "warning", "help", "danger", "contrast".'
|
2023-03-03 07:03:54 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'raised',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a shadow to indicate elevation.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'rounded',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a circular border radius to the button.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'text',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a textual class to the button without a background initially.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'outlined',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a border class without a background initially.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'size',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Defines the size of the button, valid values are "small" and "large".'
|
2023-03-06 08:14:59 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'plain',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a plain textual class to the button without a background initially.'
|
2023-04-24 12:00:20 +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.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-04-13 09:19:28 +00:00
|
|
|
const ButtonEvents = [];
|
|
|
|
|
|
|
|
const ButtonSlots = [
|
|
|
|
{
|
|
|
|
name: 'icon',
|
|
|
|
description: 'Custom icon template.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'loadingicon',
|
|
|
|
description: 'Custom loading icon template.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
module.exports = {
|
|
|
|
button: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Button',
|
|
|
|
description: 'Button is an extension to standard button element with icons and theming.',
|
2023-04-13 09:19:28 +00:00
|
|
|
props: ButtonProps,
|
|
|
|
events: ButtonEvents,
|
|
|
|
slots: ButtonSlots
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
};
|