0.4.3 master

Cascara

ActionStack

Public API

WARNING! This is an alpha release so we can try to get this code in and working to kick the tires.

actions

This is an array of objects used to tell ActionStack what to display. The label prop is the text for clickable element. The onClick prop is the click handler.

ActionStack with Actions

buttonActions
[
  {
    "label": "Action 1"
  }
]
dropdownActions
[
  {
    "label": "Action 2"
  },
  {
    "label": "Action 3"
  },
  {
    "label": "Action 4"
  }
]

A number specifying the index at which actions start to appear as dropdown items. The following example would render actions 1 and 2 as buttons and actions 4 and 4 as a dropdown items.

ActionStack with dropdownIndex

buttonActions
[
  {
    "label": "Action 1"
  },
  {
    "label": "Action 2"
  }
]
dropdownActions
[
  {
    "label": "Action 3"
  },
  {
    "label": "Action 4"
  }
]