I have an item on which I can perform multiple actions (edit, delete, copy, upgrade, ...). There's always only one action which can be performed depending on the status of the item.
So I want to create a button component in Angular to show on the item page and depending on the status I would:
- Show a specific text on the button (edit, delete, copy, ...)
- Perform a specific action
What is the best design for this use case (knowing that the number of scenario's/actions might grow in the future)?
- 1 button component with a 'onClick' function which determines which action to perform?
- A button component for each possible action and show/hide based on the status?
- Any better ideas?