storybook/docs/snippets/vue/simple-page-implementation.2.mdx
2021-02-24 17:56:50 +00:00

39 lines
801 B
Plaintext

```html
<!-- YourPage.vue -->
<template>
<PageLayout :user="user">
<DocumentHeader :document="document" />
<DocumentList :documents="subdocuments" />
</PageLayout>
</template>
<script>
import PageLayout from './PageLayout';
import DocumentHeader from './DocumentHeader';
import DocumentList from './DocumentList';
export default {
name: 'DocumentScreen',
components: { PageLayout, DocumentHeader, DocumentList },
props: {
user: {
type: String,
default: 'N/A',
},
document: {
type: Object,
default: () => ({
id: 1,
title: 'A document',
content: 'Lorem Ipsum',
}),
},
subdocuments: {
type: Array,
default: () => [],
},
},
};
</script>
```