primevue-mirror/apps/showcase/api-generator/components/chip.js

80 lines
1.8 KiB
JavaScript
Raw Normal View History

const ChipProps = [
{
2022-09-14 14:26:41 +00:00
name: 'label',
type: 'string',
default: 'null',
description: 'Defines the text to display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'icon',
type: 'string',
default: 'null',
description: 'Defines the icon to display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'image',
type: 'string',
default: 'null',
description: 'Defines the image to display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'removable',
type: 'boolean',
default: 'false',
description: 'Whether to display a remove icon.'
},
{
2022-09-14 14:26:41 +00:00
name: 'removeIconClass',
type: 'string',
default: 'pi pi-times-circle',
description: 'Icon of the remove element.'
2023-04-21 13:24:22 +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 ChipEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'remove',
description: 'Callback to invoke when a chip is removed.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
}
];
const ChipSlots = [
2023-04-18 13:42:36 +00:00
{
name: 'icon',
description: 'Custom icon template of chip component.'
},
{
name: 'removeicon',
description: 'Custom remove icon template of chip component.'
}
];
module.exports = {
chip: {
2022-09-14 14:26:41 +00:00
name: 'Chip',
description: 'Chip represents entities using icons, labels and images',
props: ChipProps,
events: ChipEvents,
slots: ChipSlots
}
};