fix(switch): element type (#1949)

This commit is contained in:
Junior Garcia 2023-11-10 09:06:49 -03:00 committed by GitHub
parent aab1dbf77c
commit 467383b8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/switch": patch
---
Fix switch base element type it is an input now.

View File

@ -6,7 +6,7 @@ import {UseSwitchProps, useSwitch} from "./use-switch";
export interface SwitchProps extends UseSwitchProps {}
const Switch = forwardRef<"label", SwitchProps>((props, ref) => {
const Switch = forwardRef<"input", SwitchProps>((props, ref) => {
const {
Component,
children,

View File

@ -23,7 +23,7 @@ export type SwitchThumbIconProps = {
isSelected: boolean;
className: string;
};
interface Props extends HTMLNextUIProps<"label"> {
interface Props extends HTMLNextUIProps<"input"> {
/**
* Ref to the DOM node.
*/

View File

@ -159,7 +159,7 @@ export const DisableAnimation = {
},
};
export const WiththumbIcon = {
export const WithThumbIcon = {
args: {
...defaultProps,
size: "xl",