-
Notifications
You must be signed in to change notification settings - Fork 770
feat(DropdownMenu/ContextMenu): handle color
field in items
#2510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By c 8000 licking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4be6a2f
feat(DropdownMenu/ContextMenu): handle `color` prop
77d63bc
docs(DropdownMenu/ContextMenu): create examples
4f010af
docs(DropdownMenu/ContextMenu): add dev examples
25d6de6
docs(DropdownMenu/ContextMenu): add dev examples icon
38a9d43
feat(DropdownMenu/ContextMenu): apply colors
026a8fa
fix(DropdownMenu/ContextMenu): types
daa6160
docs(DropdownMenu/ContextMenu): reorder example
541679e
feat(DropdownMenu/ContextMenu): add active flag
2a3f693
feat(DropdownMenu/ContextMenu): rollback loading order
b2732b1
test(DropdownMenu/ContextMenu): snapshot tests
e8766e5
Merge branch 'v3' into issue-2339
benjamincanac 86d26ff
docs: add missing slot in context menu
benjamincanac 1a0f87b
docs(context-menu/dropdown-menu): add `color` prop
benjamincanac ac6161f
chore(theme): increase opacity of icon when inactive
benjamincanac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
docs/app/components/content/examples/context-menu/ContextMenuColorItemsExample.vue
This file contains hidden or 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,33 @@ | ||
<script setup lang="ts"> | ||
const items = [ | ||
[ | ||
{ | ||
label: 'View', | ||
icon: 'i-heroicons-eye' | ||
}, | ||
{ | ||
label: 'Copy', | ||
icon: 'i-heroicons-document-duplicate' | ||
}, | ||
{ | ||
label: 'Edit', | ||
icon: 'i-heroicons-pencil' | ||
} | ||
], | ||
[ | ||
{ | ||
label: 'Delete', | ||
color: 'error' as const, | ||
icon: 'i-heroicons-trash' | ||
} | ||
] | ||
] | ||
</script> | ||
|
||
<template> | ||
<UContextMenu :items="items" class="w-48"> | ||
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72"> | ||
Right click here | ||
</div> | ||
</UContextMenu> | ||
</template> |
35 changes: 35 additions & 0 deletions
35
docs/app/components/content/examples/dropdown-menu/DropdownMenuColorItemsExample.vue
This file contains hidden or 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,35 @@ | ||
<script setup lang="ts"> | ||
const items = [ | ||
[ | ||
{ | ||
10000 label: 'View', | ||
icon: 'i-heroicons-eye' | ||
}, | ||
{ | ||
label: 'Copy', | ||
icon: 'i-heroicons-document-duplicate' | ||
}, | ||
{ | ||
label: 'Edit', | ||
icon: 'i-heroicons-pencil' | ||
} | ||
], | ||
[ | ||
{ | ||
label: 'Delete', | ||
color: 'error' as const, | ||
icon: 'i-heroicons-trash' | ||
} | ||
] | ||
] | ||
</script> | ||
|
||
<template> | ||
<UDropdownMenu :items="items" class="w-48"> | ||
<UButton label="Open" color="neutral" variant="outline" icon="i-heroicons-bars-3" /> | ||
|
||
<template #profile-trailing> | ||
<UIcon name="i-heroicons-check-badge" class="shrink-0 size-5 text-[var(--ui-primary)]" /> | ||
</template> | ||
</UDropdownMenu> | ||
</template> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.