primevue-mirror/apps/showcase/doc/icons/ConstantsDoc.vue

59 lines
1.3 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Constants API is available to reference icons easily when used programmatically.</p>
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2023-02-28 08:29:30 +00:00
<Menu :model="items" />
</div>
2024-01-30 08:16:35 +00:00
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
2023-02-28 08:29:30 +00:00
</template>
<script>
2024-06-11 12:21:12 +00:00
import { PrimeIcons } from '@primevue/core/api';
2023-02-28 08:29:30 +00:00
export default {
data() {
return {
items: [
{
label: 'File',
items: [
{ label: 'New', icon: PrimeIcons.PLUS },
{ label: 'Open', icon: PrimeIcons.DOWNLOAD }
]
}
],
code: {
2023-09-22 12:54:14 +00:00
basic: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2023-02-28 08:29:30 +00:00
<Menu :model="items" />
</div>
</template>
<script>
2024-06-11 12:21:12 +00:00
import { PrimeIcons } from '@primevue/core/api';
2023-02-28 08:29:30 +00:00
export default {
data() {
return {
items: [
{
label: 'File',
items: [
{ label: 'New', icon: PrimeIcons.PLUS },
{ label: 'Open', icon: PrimeIcons.DOWNLOAD }
]
}
]
};
}
};
<\/script>
`
}
};
}
};
</script>