Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 2dfe3b6

Browse files
avatar5555555gregberge
authored andcommitted
fix: update TS definitions (#90)
- set `TogglerProps` as optional - add `onClick` prop for `BasicsProps` inteface
1 parent 4544fe2 commit 2dfe3b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/shared/core/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ declare type OptionalThemeProp =
2222
}
2323

2424
interface BasicsProps {
25+
onClick?: (e) => void
2526
opacity?: OptionalThemeProp
2627
overflow?: OptionalThemeProp
2728
}
@@ -112,8 +113,8 @@ interface TogglerRenderProps {
112113
}
113114
interface TogglerProps {
114115
children: (props: TogglerRenderProps) => React.ReactNode
115-
defaultToggled: boolean
116-
onToggle: (value: boolean) => void
116+
defaultToggled?: boolean
117+
onToggle?: (value: boolean) => void
117118
}
118119

119120
export const Toggler: React.FunctionComponent<TogglerProps>

0 commit comments

Comments
 (0)