-
Notifications
You must be signed in to change notification settings - Fork 25
fix: context actions types #856
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 clicking “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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -33,23 +33,10 @@ | |||||
| <script lang="ts"> | ||||||
| import { defineComponent, PropType } from 'vue' | ||||||
| import ActionMenuItem from './ActionMenuItem.vue' | ||||||
| import { Action, ActionOptions } from '../../composables' | ||||||
| import { ActionOptions } from '../../composables' | ||||||
| import { AppearanceType } from '@opencloud-eu/design-system/helpers' | ||||||
| import ActionMenuDropItem from './ActionMenuDropItem.vue' | ||||||
| export type MenuSectionDrop = { | ||||||
| label: string | ||||||
| name: string | ||||||
| icon: string | ||||||
| items?: Action[] | ||||||
| emptyMessage?: string | ||||||
| } | ||||||
| export type MenuSection = { | ||||||
| name: string | ||||||
| items?: Action[] | ||||||
| dropItems?: MenuSectionDrop[] | ||||||
| } | ||||||
| import { MenuSection } from './types' | ||||||
|
||||||
| import { MenuSection } from './types' | |
| import type { MenuSection } from './types' |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,3 +2,4 @@ export { default as ActionMenuItem } from './ActionMenuItem.vue' | |||||
| export { default as ContextActionMenu } from './ContextActionMenu.vue' | ||||||
| export { default as ContextMenuQuickAction } from './ContextMenuQuickAction.vue' | ||||||
| export { default as ActionMenuDropItem } from './ActionMenuDropItem.vue' | ||||||
| export * from './types' | ||||||
|
||||||
| export * from './types' | |
| export type { MenuSection, MenuSectionDrop } from './types' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { Action } from '../../composables' | ||
|
|
||
| export type MenuSectionDrop = { | ||
| label: string | ||
| name: string | ||
| icon: string | ||
| items?: Action[] | ||
| emptyMessage?: string | ||
| } | ||
|
|
||
| export type MenuSection = { | ||
| name: string | ||
| items?: Action[] | ||
| dropItems?: MenuSectionDrop[] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Since
MenuSectionDropis only used as a TypeScript type, consider usingimport type { MenuSectionDrop } from './types'to clarify that this import will be erased at runtime.