- Removed unused imports and simplified the use of commands in `useEntryActions`. - Updated `EntryItemWrapper`, `HeaderActions`, and `MoreActions` components to utilize `CommandActionButton` for better command handling. - Introduced `CommandDropdownMenuItem` for consistent command representation in dropdowns. - Enhanced readability and maintainability by reducing redundant code and improving type safety. Signed-off-by: Innei <tukon479@gmail.com>
26 lines
568 B
TypeScript
26 lines
568 B
TypeScript
import type * as React from "react"
|
|
|
|
export interface BaseButtonProps {
|
|
isLoading?: boolean
|
|
}
|
|
|
|
// BIZ buttons
|
|
|
|
export interface ActionButtonProps {
|
|
icon?: React.ReactNode | React.FC<ComponentType>
|
|
tooltip?: React.ReactNode
|
|
tooltipSide?: "top" | "bottom"
|
|
active?: boolean
|
|
disabled?: boolean
|
|
shortcut?: string
|
|
disableTriggerShortcut?: boolean
|
|
enableHoverableContent?: boolean
|
|
size?: "sm" | "md" | "base"
|
|
|
|
/**
|
|
* @description only trigger shortcut when focus with in `<Focusable />`
|
|
* @default false
|
|
*/
|
|
shortcutOnlyFocusWithIn?: boolean
|
|
}
|