New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@s-ui/abtesting-toggle

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-ui/abtesting-toggle

> A React component that wraps a set of components and renders the one corresponding to `variation` key.

  • 1.9.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@s-ui/abtesting-toggle

A React component that wraps a set of components and renders the one corresponding to variation key.

<AbTestToggle variation="A">
  <button variationId="A" >Green Button</button>
  <button variationId="B" >Blue Button</button>
</AbTestToggle>

Installation

npm install @s-ui/abtesting-toggle --save

Usage

import AbTestToggle from '@s-ui/abtesting-toggle'
<AbTestToggle variation={variation}>
  <button style="color: green;" variationId="A" >Green Button</button>
  <button style="color: blue;" variationId="B" >Blue Button</button>
  <button style="color: black;" defaultVariation >Black Button</button>
</AbTestToggle>
  • if variation equals"A" then Green Button is shown, as it has variationId set to "A"
  • if variation="B" then Green Button is shown, as it has variationId set to "B"
  • if variation is not defined then Black Button is show, is defaultVariation is defined.

FAQs

Package last updated on 27 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc