Skip to content

Commit 5ed544a

Browse files
committed
[carbon-components-react] Ensure forwards compatiblity with React 19
1 parent 58844c7 commit 5ed544a

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

types/carbon-components-react/lib/components/Toggle/Toggle.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react";
22
import { ReactInputAttr } from "../../../typings/shared";
33

4-
type ExcludedAttributes = "aria-labelledby" | "id" | "onChange" | "onKeyUp" | "size" | "type";
4+
type ExcludedAttributes = "aria-labelledby" | "id" | "onChange" | "onKeyUp" | "onToggle" | "size" | "type";
55

66
export interface ToggleProps extends Omit<ReactInputAttr, ExcludedAttributes> {
77
defaultToggled?: boolean | undefined;

types/carbon-components-react/lib/components/ToggleSmall/ToggleSmall.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react";
22
import { ReactInputAttr } from "../../../typings/shared";
33

4-
type ExcludedAttributes = "aria-label" | "id" | "onChange" | "onKeyUp" | "ref" | "type";
4+
type ExcludedAttributes = "aria-label" | "id" | "onChange" | "onKeyUp" | "onToggle" | "ref" | "type";
55

66
export interface ToggleSmallProps extends Omit<ReactInputAttr, ExcludedAttributes> {
77
"aria-label": string;

types/carbon-components-react/lib/components/TreeView/TreeNode.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import * as React from "react";
22
import { ReactLIAttr } from "../../../typings/shared";
33

4-
export interface TreeNodeStandaloneProps extends Omit<ReactLIAttr, "aria-expanded" | "onClick" | "onSelect"> {
4+
export interface TreeNodeStandaloneProps
5+
extends Omit<ReactLIAttr, "aria-expanded" | "onClick" | "onSelect" | "onToggle">
6+
{
57
active?: number | string | undefined;
68
depth?: number | undefined;
79
isExpanded?: boolean | undefined;

types/carbon-components-react/lib/components/UIShell/SideNav.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ForwardRefReturn, InternationalProps, ReactAttr } from "../../../typing
33

44
export type SideNavTranslationKey = "carbon.sidenav.state.closed" | "carbon.sidenav.state.open";
55

6-
export interface SideNavProps extends ReactAttr, InternationalProps<SideNavTranslationKey> {
6+
export interface SideNavProps extends Omit<ReactAttr, "onToggle">, InternationalProps<SideNavTranslationKey> {
77
addFocusListeners?: boolean | undefined;
88
addMouseListeners?: boolean | undefined;
99
defaultExpanded?: boolean | undefined;

0 commit comments

Comments
 (0)