File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66<docs >
77### General description
8+ Guest content container to be used for the guest content of your app.
89
910This components provides a wrapper around guest page content.
1011It should be used as the main wrapper for public pages, similar to `NcContent`.
@@ -23,27 +24,29 @@ It can't be used multiple times on the same page.
2324```
2425</docs >
2526
27+ <script setup lang="ts">
28+ import type { Slot } from ' vue'
29+ import { onMounted , onUnmounted } from ' vue'
30+
31+ defineSlots <{
32+ default? : Slot
33+ }>()
34+
35+ onMounted (() => {
36+ document .getElementById (' content' )! .classList .add (' nc-guest-content' )
37+ })
38+
39+ onUnmounted (() => {
40+ document .getElementById (' content' )! .classList .remove (' nc-guest-content' )
41+ })
42+ </script >
43+
2644<template >
2745 <div id =" guest-content-vue" >
2846 <slot />
2947 </div >
3048</template >
3149
32- <script >
33- /**
34- * Guest content container to be used for the guest content of your app
35- */
36- export default {
37- name: ' NcGuestContent' ,
38- mounted () {
39- document .getElementById (' content' ).classList .add (' nc-guest-content' )
40- },
41- unmounted () {
42- document .getElementById (' content' ).classList .remove (' nc-guest-content' )
43- },
44- }
45- </script >
46-
4750<style lang="scss" scoped>
4851#guest-content-vue {
4952 color : var (--color-main-text );
File renamed without changes.
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ export { default as NcDialogButton } from './NcDialogButton/index.js'
5454export { default as NcEllipsisedOption } from './NcEllipsisedOption/index.js'
5555export { default as NcEmojiPicker } from './NcEmojiPicker/index.js'
5656export { default as NcEmptyContent } from './NcEmptyContent/index.ts'
57- export { default as NcGuestContent } from './NcGuestContent/index.js '
58- export { default as NcHeaderButton } from './NcHeaderButton/index'
57+ export { default as NcGuestContent } from './NcGuestContent/index.ts '
58+ export { default as NcHeaderButton } from './NcHeaderButton/index.ts '
5959export { default as NcHeaderMenu } from './NcHeaderMenu/index.js'
6060export { default as NcHighlight } from './NcHighlight/index.js'
6161export { default as NcIconSvgWrapper } from './NcIconSvgWrapper/index.js'
You can’t perform that action at this time.
0 commit comments