-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
12 changed files
with
551 additions
and
289 deletions.
There are no files selected for viewing
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
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,49 @@ | ||
<script setup lang="ts"> | ||
import { UiButton, UiContainer, UiDropdown } from '#components'; | ||
import type { DropdownItem } from '#ui/types'; | ||
import { ref } from 'vue'; | ||
const isOpen = ref(false); | ||
const demoItems: DropdownItem[][] = [ | ||
[ | ||
{ label: 'Profile', icon: 'i-heroicons-user' }, | ||
{ label: 'Billing', icon: 'i-heroicons-credit-card' }, | ||
{ label: 'Settings', icon: 'i-heroicons-cog-6-tooth' }, | ||
], | ||
[ | ||
{ label: 'Teams', icon: 'i-heroicons-users' }, | ||
{ label: 'New Team', icon: 'i-heroicons-plus', disabled: true }, | ||
], | ||
]; | ||
</script> | ||
|
||
<template> | ||
<UiContainer class="py-8"> | ||
<h1 class="demo-page-title">Dropdown menu</h1> | ||
<p class="demo-page-description"> | ||
Displays a menu to the user with a set of links or actions after being triggered. | ||
</p> | ||
|
||
<div class="demo-category-container mt-4"> | ||
<span class="demo-category-title">Controlled component (isOpen: {{ isOpen }})</span> | ||
|
||
<div class="mt-2 flex items-center gap-4"> | ||
<UiDropdown v-model:open="isOpen" :items="demoItems"> | ||
<UiButton label="Menu" trailing-icon="i-heroicons-bars-3-16-solid" /> | ||
</UiDropdown> | ||
<UiButton variant="white-solid" label="Open from external" @click="isOpen = true" /> | ||
</div> | ||
</div> | ||
|
||
<div class="demo-category-container mt-4"> | ||
<span class="demo-category-title">Uncontrolled</span> | ||
|
||
<div class="mt-2 flex items-center gap-4"> | ||
<UiDropdown :items="demoItems" label="My Account"> | ||
<UiButton label="Options" variant="white-solid" trailing-icon="i-heroicons-chevron-down-16-solid" /> | ||
</UiDropdown> | ||
</div> | ||
</div> | ||
</UiContainer> | ||
</template> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** @type {import("prettier").Options} */ | ||
const config = { | ||
semi: true, | ||
tabWidth: 2, | ||
useTabs: false, | ||
printWidth: 110, | ||
endOfLine: 'auto', | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
bracketSameLine: false, | ||
plugins: ['prettier-plugin-tailwindcss'], | ||
}; | ||
|
||
module.exports = config; |
Oops, something went wrong.