mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(switch): element type (#1949)
This commit is contained in:
parent
aab1dbf77c
commit
467383b8a2
5
.changeset/unlucky-bikes-care.md
Normal file
5
.changeset/unlucky-bikes-care.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/switch": patch
|
||||
---
|
||||
|
||||
Fix switch base element type it is an input now.
|
||||
@ -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,
|
||||
|
||||
@ -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.
|
||||
*/
|
||||
|
||||
@ -159,7 +159,7 @@ export const DisableAnimation = {
|
||||
},
|
||||
};
|
||||
|
||||
export const WiththumbIcon = {
|
||||
export const WithThumbIcon = {
|
||||
args: {
|
||||
...defaultProps,
|
||||
size: "xl",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user