BlueprintEnabler

Description#

This component allows an end user to activate, deactivate and configure a specific blueprint.

Import#

import { BlueprintEnabler } from "@rollouthq/connect-react";

Usage#

Here's a basic usage example:

<BlueprintEnabler
blueprintKey="BLUEPRINT_ID_TO_ACTIVATE"
name="sample blueprint"
prefilled={{ action: { appKey: "gmail" } }}
/>

This will produce the following:


When the end users fills it in and presses the Enable button, it will look like this:

Pressing the Disable button will take it back to how it was before

We can also fill in more props. Here is a more complex example

<BlueprintEnabler
blueprintKey="BLUEPRINT_ID_TO_ACTIVATE"
name="complex sample blueprint"
prefilled={{
action: {
appKey: "gmail",
actionKey: "sendEmail",
inputParams: {
subject: "{{task_name}}",
},
},
trigger: { appKey: "admin", triggerKey: "taskCompleted" },
}}
onEnabled={() => console.log("now enabled")}
onDisabled={() => console.log("now disabled")}
updateButtonText="Custom Update Button Text"
enableButtonText="Custom Enable Button Text"
disableButtonText="Custom Disable Button Text"
/>

It will look like this when rendered: