1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Added follow as menu option
This commit is contained in:
xmflsct
2023-01-08 16:59:35 +01:00
parent 9e0e8db82a
commit 6ce78e94f8
25 changed files with 611 additions and 241 deletions

View File

@ -1,6 +1,53 @@
type ContextMenu = {
// type ContextMenu = (
// | {
// type: 'group'
// key: string
// items: ContextMenuItem[]
// }
// | {
// type: 'sub'
// key: string
// trigger: {
// key: string
// props: {
// disabled: boolean
// destructive: boolean
// hidden: boolean
// }
// title: string
// icon?: string
// }
// items: ContextMenuItem[]
// }
// )[]
type ContextMenu = (ContextMenuItem | ContextMenuSub)[][]
type ContextMenuItem = {
type: 'item'
key: string
item: { onSelect: () => void; disabled: boolean; destructive: boolean; hidden: boolean }
props: {
onSelect: () => void
disabled: boolean
destructive: boolean
hidden: boolean
}
title: string
icon: string
icon?: string
}
type ContextMenuSub = {
type: 'sub'
key: string
trigger: {
key: string
props: {
disabled: boolean
destructive: boolean
hidden: boolean
}
title: string
icon?: string
}
items: Omit<ContextMenuItem, 'type'>[]
}