Interface CommandButtonOptions<STATE, CONTEXT>

interface CommandButtonOptions<STATE, CONTEXT> {
    commandHook?: ICommandHook<STATE, CONTEXT>;
    commandState?: STATE;
    context?: CONTEXT;
    disableHover?: boolean;
    disabled?: boolean;
    icon?: ReactNode | (() => ReactNode);
    scope?: string;
    selected?: boolean;
    sx?: SxProps<Theme>;
    variant?: CommandButtonType;
}

Type Parameters

  • STATE = any
  • CONTEXT = any

Hierarchy (view full)

Properties

commandHook?: ICommandHook<STATE, CONTEXT>

Allow for listeners against a specific buttons execute rather than the command. This is useful when know the specific button that executed a command is required. (For example when closing menus or restoring focus)

commandState?: STATE

Optional state for this specific command button.

Default Value

to undefined
context?: CONTEXT
disableHover?: boolean
disabled?: boolean
icon?: ReactNode | (() => ReactNode)

Type declaration

    • (): ReactNode
    • Returns ReactNode

scope?: string

Optional string to enable the command label to be configured based on the scope of how it is being used.

selected?: boolean
sx?: SxProps<Theme>

MUI SX props

How the button will be styles.

Default Value

CommandButtonType.Toolbar