File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/bezier-react/src/components/Tabs Expand file tree Collapse file tree 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) => {
4242 * `TabAction` is a button for more action to open a new link or navigate to a different url.
4343 * If it has `href` props, it should act as a link.
4444 */
45- export const TabAction = forwardRef ( function TabAction < Link extends string | undefined > ( {
45+ export const TabAction = forwardRef ( function TabAction ( {
4646 href,
4747 children,
4848 onClick,
4949 ...rest
50- } : TabActionProps < Link > , forwardedRef : React . Ref < TabActionElement < Link > > ,
50+ } , forwardedRef ,
5151) {
5252 const { size } = useTabListContext ( )
5353
@@ -88,4 +88,8 @@ export const TabAction = forwardRef(function TabAction<Link extends string | und
8888 </ Styled . ToolbarLink >
8989 )
9090 )
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