File tree 2 files changed +12
-3
lines changed
packages/bezier-react/src/components/Tabs
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @channel.io/bezier-react " : patch
3
+ ---
4
+
5
+ add type cast to fix incorrect type infer in ` TabAction ` component
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ const getIconSizeBy = (size: TabSize) => {
42
42
* `TabAction` is a button for more action to open a new link or navigate to a different url.
43
43
* If it has `href` props, it should act as a link.
44
44
*/
45
- export const TabAction = forwardRef ( function TabAction < Link extends string | undefined > ( {
45
+ export const TabAction = forwardRef ( function TabAction ( {
46
46
href,
47
47
children,
48
48
onClick,
49
49
...rest
50
- } : TabActionProps < Link > , forwardedRef : React . Ref < TabActionElement < Link > > ,
50
+ } , forwardedRef ,
51
51
) {
52
52
const { size } = useTabListContext ( )
53
53
@@ -88,4 +88,8 @@ export const TabAction = forwardRef(function TabAction<Link extends string | und
88
88
</ Styled . ToolbarLink >
89
89
)
90
90
)
91
- } )
91
+ } ) as < Link extends string | undefined > (
92
+ props : TabActionProps < Link > & {
93
+ ref ?: React . ForwardedRef < TabActionElement < Link > >
94
+ }
95
+ ) => JSX . Element
You can’t perform that action at this time.
0 commit comments