furo-feature-toggle

furo-feature-toggle #

@furo/util v2.1.19
import '@furo/util/src/furo-feature-toggle.js';
exports FuroFeatureToggle js
exports <furo-feature-toggle> custom-element-definition
superclass LitElement
mixes FBP

summary flow based handler for feature toggles

furo-feature-toggle Is a handler for feature toggles, you can react to key changes with FBP. This component is quite simple, but gives you a lot of possibilities. Read more about feature toggles in the guide

1
2
3
4
5
6
7
8
9
<!-- setting a key -->
<furo-feature-toggle
   key="feature.easter.egg" fn-set-true="--activateClicked" fn-set-false="--disableClicked">
   </furo-feature-toggle>

<!-- observing key changes -->
<furo-feature-toggle
   key="feature.xxxx.yyy"  at-key-activated="--fxyActivated" at-key-changed="--fxyChanged">
   </furo-feature-toggle>

Attributes and Properties #

key #

key String

Name of a feature toggle.

Events #

key-true #

at-key-truetrue

Fired when the key is set to true or is true on init.

key-false #

at-key-falsefalse

Fired when the key is set to false or is false on init.

key-changed #

at-key-changedBoolean

Fired on init and when the key changes its state.

Methods #

setFalse #

setFalse() ⟹ void

*fn-set-false

Sets a feature key state to false.



setTrue #

setTrue() ⟹ void

*fn-set-true

Sets a feature key state to true.