Skip to content

Latest commit

 

History

History
73 lines (65 loc) · 2.82 KB

toggle-tool.md

File metadata and controls

73 lines (65 loc) · 2.82 KB

Toggle

A toggle dev tool allows you to store, update, and consume boolean configuration values.

🤖 Android 🍏 iOS
toggle-tool Not ready yet.

Parameters

Name Type Default Optional Description
title string "" A tool title that will be displayed inside the configuration screen.
description string "" A short description explaining what the configuration value is doing and what changes might bring its update.
canBeDisabled boolean false Will add a checkbox to the tool, which will allow disabling it.
defaultEnabledValue boolean true The tool will be enabled by default if true and disabled vice-versa.
isCritical boolean false The tool which will have it set to true will trigger critical updates.
default boolean false The default boolean configuration value.

Sources

Yaml

Below is an example of a toggle tool configuration in YML format. Note that you should use the !toggle type.

toggle-tool: !toggle {
  title: "Toggle tool",
  description: "A boolean configuration value tool",
  canBeDisabled: true,
  defaultEnabledValue: false,
  isCritical: true,
  default: true
}

Json

Below is an example of a toggle tool configuration in JSON Schema format. Note that you should add the "type": "boolean" to the configuration object to make it map to a toggle tool.

"toggle-tool": {
  "type": "boolean",
  "title": "Toggle tool",
  "description": "A boolean configuration value tool",
  "canBeDisabled": true,
  "defaultEnabledValue": false,
  "isCritical": true,
  "default": true
}

Memory

🍏 iOS

TBA 

🤖 Android

val tool = ToggleTool(default = false)

tool = title = "Toggle tool"
tool = description = "A boolean configuration value dev tool"
tool = canBeDisabled = true
tool = defaultEnabledValue = false
tool = isCritical = true