From 433558a1310a3b0cbd706c43d709944daeb8e149 Mon Sep 17 00:00:00 2001
From: pavel <14926950+prichodko@users.noreply.github.com>
Date: Fri, 27 Sep 2024 16:51:28 +0200
Subject: [PATCH] add `` and `` (#582)
* add
* add
* unify checkbox and switch
* Create warm-countries-cry.md
* fix displayName
---
.changeset/warm-countries-cry.md | 5 ++
packages/components/package.json | 1 +
packages/components/src/checkbox/checkbox.tsx | 8 +--
.../dropdown-menu/dropdown-menu.stories.tsx | 12 +++--
.../src/dropdown-menu/dropdown-menu.tsx | 48 +++++++++++++++++-
packages/components/src/index.tsx | 1 +
packages/components/src/switch/index.tsx | 2 +
.../components/src/switch/switch.stories.tsx | 50 +++++++++++++++++++
packages/components/src/switch/switch.tsx | 43 ++++++++++++++++
yarn.lock | 13 +++++
10 files changed, 174 insertions(+), 9 deletions(-)
create mode 100644 .changeset/warm-countries-cry.md
create mode 100644 packages/components/src/switch/index.tsx
create mode 100644 packages/components/src/switch/switch.stories.tsx
create mode 100644 packages/components/src/switch/switch.tsx
diff --git a/.changeset/warm-countries-cry.md b/.changeset/warm-countries-cry.md
new file mode 100644
index 00000000..93f81a09
--- /dev/null
+++ b/.changeset/warm-countries-cry.md
@@ -0,0 +1,5 @@
+---
+"@status-im/components": patch
+---
+
+Add `` and ``
diff --git a/packages/components/package.json b/packages/components/package.json
index 7ef450a3..0705a662 100644
--- a/packages/components/package.json
+++ b/packages/components/package.json
@@ -47,6 +47,7 @@
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-popover": "^1.1.1",
+ "@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-tooltip": "^1.1.2",
diff --git a/packages/components/src/checkbox/checkbox.tsx b/packages/components/src/checkbox/checkbox.tsx
index 4a6eae01..684c6438 100644
--- a/packages/components/src/checkbox/checkbox.tsx
+++ b/packages/components/src/checkbox/checkbox.tsx
@@ -7,7 +7,7 @@ import { cva } from 'cva'
import type { VariantProps } from 'cva'
-type Variants = VariantProps
+type Variants = VariantProps
type Props = Omit & {
checked: boolean
@@ -23,7 +23,7 @@ const Root = forwardRef, Props>(