-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4034427
commit 04c85a5
Showing
5 changed files
with
165 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<DocSection label="Sidebar" :code="code"> | ||
<template #description> | ||
A sidebar | ||
</template> | ||
<template #example> | ||
<Sidebar v-model:visible="visible" :items="items" /> | ||
<Button icon="plus" @click="visible = !visible" /> | ||
</template> | ||
</DocSection> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import DocSection from '@/components/doc/DocSection.vue' | ||
import { ref } from 'vue' | ||
import { Sidebar, Button } from 'vue-fomantic-ui' | ||
const visible = ref(false) | ||
const items = [ | ||
{ text: 1 }, | ||
{ text: 2 }, | ||
{ text: 3 }, | ||
] | ||
const code = `<template> | ||
<Sidebar v-model:visible="visible" :items="items" /> | ||
<Button icon="plus" @click="visible = !visible" /> | ||
<\/template> | ||
<script setup> | ||
import { ref } from 'vue' | ||
import { Sidebar, Button } from 'vue-fomantic-ui' | ||
const visible = ref(false) | ||
const items = [ | ||
{ text: 1 }, | ||
{ text: 2 }, | ||
{ text: 3 }, | ||
] | ||
<\/script>` | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<template> | ||
<DocSection :code="code"> | ||
<template #example> | ||
<div class="ui top attached demo menu"> | ||
<a class="item" @click="visible = !visible"> | ||
<i class="sidebar icon"></i> | ||
Menu | ||
</a> | ||
</div> | ||
<Segment attached="bottom"> | ||
<Sidebar | ||
v-model:visible="visible" | ||
:items="items" | ||
icon="labeled" | ||
:mountOnBody="false" | ||
/> | ||
<div class="pusher"> | ||
<Segment basic> | ||
<h3 class="ui header">Application Content</h3> | ||
<img src="/images/wireframe/short-paragraph.png" /> | ||
<img src="/images/wireframe/short-paragraph.png" /> | ||
<img src="/images/wireframe/short-paragraph.png" /> | ||
<img src="/images/wireframe/short-paragraph.png" /> | ||
</Segment> | ||
</div> | ||
</Segment> | ||
</template> | ||
</DocSection> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import DocSection from '@/components/doc/DocSection.vue' | ||
import { ref } from 'vue' | ||
import { Sidebar, Segment } from 'vue-fomantic-ui' | ||
const visible = ref(false) | ||
const items = ref([ | ||
{ icon: 'gamepad', text: 'Games' }, | ||
{ icon: 'video camera', text: 'Channels' }, | ||
{ icon: 'video play', text: 'Videos' }, | ||
]) | ||
const code = `<template> | ||
<div class="ui top attached demo menu"> | ||
<a class="item" @click="visible = !visible"> | ||
<i class="sidebar icon"></i> | ||
Menu | ||
</a> | ||
</div> | ||
<Segment attached="bottom"> | ||
<Sidebar | ||
v-model:visible="visible" | ||
:items="items" | ||
icon="labeled" | ||
:mountOnBody="false" | ||
v-bind="args" | ||
/> | ||
<div class="pusher"> | ||
<Segment basic> | ||
<h3 class="ui header">Application Content</h3> | ||
<img src="./wireframe/short-paragraph.png" /> | ||
<img src="./wireframe/short-paragraph.png" /> | ||
<img src="./wireframe/short-paragraph.png" /> | ||
<img src="./wireframe/short-paragraph.png" /> | ||
</Segment> | ||
</div> | ||
</Segment> | ||
<\/template> | ||
<script setup> | ||
import { ref } from 'vue' | ||
import { Sidebar, Segment } from 'vue-fomantic-ui' | ||
const visible = ref(false) | ||
const items = ref([ | ||
{ icon: 'gamepad', text: 'Games' }, | ||
{ icon: 'video camera', text: 'Channels' }, | ||
{ icon: 'video play', text: 'Videos' }, | ||
]) | ||
<\/script>` | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<DocComponent | ||
title="Sidebar" | ||
description="A sidebar hides additional content beside a page." | ||
:component-docs="docs" | ||
:api-docs="api" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import DocComponent from '@/components/doc/DocComponent.vue' | ||
// Types | ||
import SidebarDoc from '@/components/modules/Sidebar/SidebarDoc.vue' | ||
import SidebarPusherDoc from '@/components/modules/Sidebar/SidebarPusherDoc.vue' | ||
const docs = [ | ||
{ | ||
id: 'sidebar', | ||
label: 'Sidebar', | ||
category: 'Types', | ||
component: [SidebarDoc, SidebarPusherDoc], | ||
}, | ||
] | ||
const api = { | ||
Sidebar: { | ||
props: [ | ||
{ name: 'animation', type: 'string', default: 'overlay', description: 'Specifies the animation of the sidebar.' }, | ||
{ name: 'dimmed', type: 'boolean', default: 'false', description: 'When specified, display the dim inside pusher content.' }, | ||
{ name: 'direction', type: 'string', default: 'left', description: 'Specifies the direction the sidebar should appear on.' }, | ||
{ name: 'visible', type: 'boolean', default: 'false', description: 'Specifies the visibility of the sidebar.' } | ||
], | ||
events: [ | ||
{ name: 'change', description: 'Callback to invoke when checkbox value is changed.' }, | ||
{ name: 'click', description: 'Callback to invoke when checkbox is clicked.' } | ||
] | ||
} | ||
} | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters