11import { cleanup , fireEvent , render } from '@testing-library/react' ;
22import React from 'react' ;
3- import Trigger , { UniqueProvider } from '../src' ;
3+ import Trigger , { UniqueProvider , type UniqueProviderProps } from '../src' ;
44import { awaitFakeTimer } from './util' ;
55import type { TriggerProps } from '../src' ;
66import classNames from 'classnames' ;
@@ -257,9 +257,14 @@ describe('Trigger.Unique', () => {
257257 } ) ;
258258
259259 it ( 'should apply postTriggerProps to customize options' , async ( ) => {
260- const postTriggerProps = ( options : any ) => ( {
260+ const postTriggerProps : UniqueProviderProps [ 'postTriggerProps' ] = (
261+ options ,
262+ ) => ( {
261263 ...options ,
262- popupClassName : classNames ( options . popupClassName , 'custom-post-options-class' ) ,
264+ popupClassName : classNames (
265+ options . popupClassName ,
266+ 'custom-post-options-class' ,
267+ ) ,
263268 } ) ;
264269
265270 render (
@@ -276,6 +281,8 @@ describe('Trigger.Unique', () => {
276281 ) ;
277282
278283 // Check that the custom class from postTriggerProps is applied
279- expect ( document . querySelector ( '.rc-trigger-popup' ) ) . toHaveClass ( 'custom-post-options-class' ) ;
284+ expect ( document . querySelector ( '.rc-trigger-popup' ) ) . toHaveClass (
285+ 'custom-post-options-class' ,
286+ ) ;
280287 } ) ;
281288} ) ;
0 commit comments