Skip to content

Commit

Permalink
refactor(toggleswitch): remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Lüders authored and rluders committed Sep 24, 2023
1 parent 44f458d commit 3f879e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/ToggleSwitch/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ComponentProps, FC, KeyboardEvent } from 'react';
import { useId, useRef } from 'react';
import { useId } from 'react';
import { twMerge } from 'tailwind-merge';
import type { DeepPartial, FlowbiteBoolean, FlowbiteColors } from '../../';
import { useTheme } from '../../';
Expand Down Expand Up @@ -44,7 +44,6 @@ export const ToggleSwitch: FC<ToggleSwitchProps> = ({
}) => {
const id = useId();
const theme = mergeDeep(useTheme().theme.toggleSwitch, customTheme);
const buttonRef = useRef<HTMLButtonElement>(null);

const toggle = (): void => onChange(!checked);

Expand All @@ -64,7 +63,6 @@ export const ToggleSwitch: FC<ToggleSwitchProps> = ({
<input checked={checked} hidden name={name} readOnly type="checkbox" className="sr-only" />
) : null}
<button
ref={buttonRef}
aria-checked={checked}
aria-labelledby={`${id}-flowbite-toggleswitch-label`}
disabled={disabled}
Expand Down

0 comments on commit 3f879e7

Please sign in to comment.