aboutsummaryrefslogtreecommitdiff
path: root/resources/vue/apps/ContentBar.vue
blob: 3cf4b2b82a36ea0476f374f717b3023fd260f6d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script>
import { h } from 'vue';
import ContentBar from '@/vue/components/ContentBar.vue';
import ContentBarBreadcrumbs from '@/vue/components/ContentBarBreadcrumbs.vue';

export default {
    props: ['icon', 'isContentBar', 'toc'],
    setup(props, context) {
        return () =>
            h(
                ContentBar,
                {
                    icon: props.icon,
                    isContentBar: props.isContentBar,
                    toc: props.toc,
                },
                props.toc ? {
                    'breadcrumb-list': () => h(ContentBarBreadcrumbs, { toc: props.toc }),
                    ...context.slots,
                } : {},
            );
    },
};
</script>