UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

49 lines (37 loc) 1.58 kB
FinishButton ============ This widget is used to manage the Finish button that appears in the navigation bar. You can use it to define some rules to control the availability of the finishing of the editing process. Note, this widget is **non-visual**! You don't insert it to any step because we don't have any containers for the navigation bar. You may think of it as a "proxy" for the real Finish button. ## General info - **type**: `finish-button` ## Params - `visible` - whether the button should be visible or not (provided that you are on the last step). The default value is `true`. - `enabled` - whether the button should be enabled or not. The default value is `true`. - `onClick` - a function (like `'{{#function <expression>}}'`) or an array of functions that is called when the button is clicked. You can carry out some actions before calling the `onSubmitting` event in the ecommerce-driver. ## Example For example, assume that you want to lock the **Finish** button until the user sets the [Checkbox](checkbox.md). ``` json { "widgets": [ { "name": "agree-checkbox", "type": "checkbox", "params": { "prompt": "I approve the design.", "value": false } }, { "name": "finish-button", "type": "finish-button", "params": { "enabled": "{{$['agree-checkbox']._}}" } } ] } ``` ## See also - [Order widget](order.md) - [Steps widget](steps.md) - [Checkbox widget](checkbox.md)