diff --git a/apps/explorer/src/components/ui/DropdownMenu.tsx b/apps/explorer/src/components/ui/DropdownMenu.tsx
index 8a08bbb9bd0..d03710a953a 100644
--- a/apps/explorer/src/components/ui/DropdownMenu.tsx
+++ b/apps/explorer/src/components/ui/DropdownMenu.tsx
@@ -2,9 +2,10 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
-import { Text, Toggle } from '@iota/ui';
+import { Text } from '@iota/ui';
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
import { type ReactNode } from 'react';
+import { Root, Thumb } from '@radix-ui/react-switch';
type DropdownMenuProps = {
content: ReactNode;
@@ -46,20 +47,24 @@ export function DropdownMenuCheckboxItem({
checked = false,
...radixRootProps
}: DropdownMenuCheckboxItemProps): JSX.Element {
+ const handleCheckedChange = (checked: boolean) => {
+ if (radixRootProps.onCheckedChange) {
+ radixRootProps.onCheckedChange(checked);
+ }
+ };
return (
Show System Transactions
-
{
- e.stopPropagation();
- }}
+
+ onCheckedChange={handleCheckedChange}
+ >
+
+
);
diff --git a/apps/ui/src/Toggle.stories.tsx b/apps/ui/src/Toggle.stories.tsx
deleted file mode 100644
index 4ea362efb96..00000000000
--- a/apps/ui/src/Toggle.stories.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) Mysten Labs, Inc.
-// Modifications Copyright (c) 2024 IOTA Stiftung
-// SPDX-License-Identifier: Apache-2.0
-
-import { type Meta, type StoryObj } from '@storybook/react';
-
-import { Toggle } from './Toggle';
-
-const meta = {
- component: Toggle,
-} satisfies Meta;
-
-export default meta;
-
-type Story = StoryObj;
-
-export const Default: Story = {};
-
-export const Checked: Story = {
- args: {
- checked: true,
- },
-};
diff --git a/apps/ui/src/Toggle.tsx b/apps/ui/src/Toggle.tsx
deleted file mode 100644
index a9d4785c7aa..00000000000
--- a/apps/ui/src/Toggle.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) Mysten Labs, Inc.
-// Modifications Copyright (c) 2024 IOTA Stiftung
-// SPDX-License-Identifier: Apache-2.0
-
-import { Root, Thumb, type SwitchProps } from '@radix-ui/react-switch';
-
-export function Toggle(props: Omit) {
- return (
-
-
-
- );
-}
diff --git a/apps/ui/src/index.ts b/apps/ui/src/index.ts
index 879c4252c9b..6d5602247f9 100644
--- a/apps/ui/src/index.ts
+++ b/apps/ui/src/index.ts
@@ -8,5 +8,4 @@ export * from './LoadingIndicator';
export * from './Heading';
export * from './IconButton';
export * from './Placeholder';
-export * from './Toggle';
export * from './Combobox';