Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typing support #87

Open
KM8Oz opened this issue Dec 24, 2022 · 1 comment
Open

typing support #87

KM8Oz opened this issue Dec 24, 2022 · 1 comment

Comments

@KM8Oz
Copy link

KM8Oz commented Dec 24, 2022

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @trendmicro/react-sidenav@0.5.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@trendmicro/react-sidenav/index.d.ts b/node_modules/@trendmicro/react-sidenav/lib/index.d.ts
new file mode 100644
index 0000000..90d979b
--- /dev/null
+++ b/node_modules/@trendmicro/react-sidenav/lib/index.d.ts
@@ -0,0 +1,35 @@
+import * as React from 'react';
+
+export interface ToggleProps {
+    expanded: boolean;
+    onToggle: (expanded: boolean) => void;
+}
+export interface SideNavProps {
+    onToggle: (expanded: boolean) => void;
+    expanded: boolean;
+    className?: string;
+    style?: React.CSSProperties;
+}
+export interface NavItemProps {
+    onClick?: () => void;
+    className?: string;
+    style?: React.CSSProperties;
+}
+export interface NavIconProps {
+    className?: string;
+    style?: React.CSSProperties;
+}
+export interface NavProps {
+    className?: string;
+    style?: React.CSSProperties;
+}
+export interface NavTextProps {
+    className?: string;
+    style?: React.CSSProperties;
+}
+export default class SideNav extends React.Component<SideNavProps> { }
+export class NavText extends React.Component<NavTextProps> { }
+export class Nav extends React.Component<NavProps> { }
+export class NavIcon extends React.Component<NavIconProps> { }
+export class NavItem extends React.Component<NavItemProps> { }
+export class Toggle extends React.Component<ToggleProps> { }
diff --git a/node_modules/@trendmicro/react-sidenav/yarn.lock b/node_modules/@trendmicro/react-sidenav/yarn.lock
new file mode 100644
index 0000000..e69de29

This issue body was partially generated by patch-package.

@ghanshyam253
Copy link

Hi, Could you please share complete index.d.ts file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants