FxOperationButton

Type: React component

How to get FxOperationButton?

JavaScript

import FxOperationButton from 'fontoxml-fx/src/FxOperationButton.jsx'

A compact button that invokes and reflects the state of an operation.

Props

  1. focusEditorWhenDone

    (Optional)

    Type: FocusEditorWhenDone

    Default value

  2. icon

    (Optional)

    Type: Icon

    The icon that is displayed before the label. This overrides the icon provided by the operation (operation.icon).

    Default value

  3. iconAfter

    (Optional)

    Type: Icon

    The icon that is displayed after the label.

    Default value

  4. isDisabled

    (Optional)

    Type: IsDisabled

    Default value

  5. isHighlighted

    (Optional)

    Type: Boolean

  6. isSelected

    (Optional)

    Type: IsSelected

    Default value

  7. label

    (Optional)

    Type: String

    The label of the button. This overrides the label provided by the operation (operation.label).

    Default value

  8. onClick

    (Optional)

    Type: OnClickCallback

    Default value

  9. operationName

    (Required)

    The operation name.

  10. operationData

    (Optional)

    The operation data to evaluate the operation with.

    Default value

  11. tooltipContent

    (Optional)

    Type: TooltipContent

    The tooltip for the button. This overrides the tooltipContent provided by the operation (operation.description)

    Default value

  12. type

    (Optional)

    Type: String

    Allows you to override the background and border color from its default values (which are based on the context where you use the button; masthead / masthead tab buttons / toolbar) to one of either:

    • 'default'

    • 'primary'

    • 'transparent'

    • 'warning'

    • 'error'

    Defaults to 'default', which is then interpreted based on the context.

    Please visit the Button playground example for visual examples for each type in each context.