Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ably/ui

Package Overview
Dependencies
Maintainers
0
Versions
422
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ably/ui - npm Package Compare versions

Comparing version 15.1.4-dev.0746ac8 to 15.1.4-dev.84d6f05

2

core/Toggle.js

@@ -1,1 +0,1 @@

import*as Switch from"@radix-ui/react-switch";import React from"react";import cn from"./utils/cn";const Toggle=({id,size,label,className,...props})=>{const rootSize=size==="small"?"w-[42px] h-[24px]":"w-[56px] h-32";const thumbSize=size==="small"?"w-[21px] h-[21px] translate-x-1 data-[state=checked]:translate-x-[20px]":"h-[28px] w-[28px] translate-x-2 data-[state=checked]:translate-x-[26px]";return /*#__PURE__*/React.createElement("div",{className:"flex items-center"},/*#__PURE__*/React.createElement(Switch.Root,{className:cn("p-0 bg-neutral-600 rounded-full relative inline-block transition-colors data-[disabled]:bg-gui-unavailable data-[disabled]:cursor-not-allowed data-[state=checked]:bg-orange-600 focus:outline-none focus-visible:outline-offset-0 focus-visible:outline-4 focus-visible:outline-gui-focus",className,rootSize),id:id,...props},/*#__PURE__*/React.createElement(Switch.Thumb,{className:`block bg-white data-[disabled]:bg-neutral-500 rounded-full drop-shadow-toggle transition-transform ${thumbSize}`})),label?/*#__PURE__*/React.createElement("label",{className:"ml-16",htmlFor:id},label):null)};export default Toggle;
import*as Switch from"@radix-ui/react-switch";import React from"react";import cn from"./utils/cn";const Toggle=({id,size="lg",label,className,...props})=>{const rootSize=size==="sm"?"w-[42px] h-[24]":"w-[56px] h-32";const thumbSize=size==="sm"?"w-[21px] h-[21px] translate-x-1 data-[state=checked]:translate-x-[20px]":"h-[28px] w-[28px] translate-x-2 data-[state=checked]:translate-x-[26px]";return /*#__PURE__*/React.createElement("div",{className:"flex items-center"},/*#__PURE__*/React.createElement(Switch.Root,{className:cn("p-0 bg-neutral-600 rounded-full relative inline-block transition-colors data-[disabled]:bg-gui-unavailable data-[disabled]:cursor-not-allowed data-[state=checked]:bg-orange-600 focus:outline-none focus-visible:outline-offset-0 focus-visible:outline-4 focus-visible:outline-gui-focus",className,rootSize),id:id,...props},/*#__PURE__*/React.createElement(Switch.Thumb,{className:cn(`block bg-white data-[disabled]:bg-neutral-500 rounded-full drop-shadow-toggle transition-transform`,thumbSize)})),label?/*#__PURE__*/React.createElement("label",{className:"ml-16",htmlFor:id},label):null)};export default Toggle;
{
"name": "@ably/ui",
"version": "15.1.4-dev.0746ac8",
"version": "15.1.4-dev.84d6f05",
"description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is too big to display

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