File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -775,4 +775,28 @@ describe('Tabs.Basic', () => {
775
775
expect ( content ) . toHaveStyle ( { background : 'green' } ) ;
776
776
expect ( header ) . toHaveStyle ( { background : 'yellow' } ) ;
777
777
} ) ;
778
+
779
+ it ( 'support classnames and styles for editable' , ( ) => {
780
+ const customClassNames = {
781
+ close : 'custom-close' ,
782
+ } ;
783
+ const customStyles = {
784
+ close : { background : 'red' } ,
785
+ } ;
786
+
787
+ const { container } = render (
788
+ < Tabs
789
+ editable = { {
790
+ onEdit : ( ) => { } ,
791
+ } }
792
+ tabPosition = "left"
793
+ items = { [ { key : 'test' , label : 'test' , icon : 'test' } ] }
794
+ styles = { customStyles }
795
+ classNames = { customClassNames }
796
+ /> ,
797
+ ) ;
798
+
799
+ expect ( container . querySelector ( '.rc-tabs-tab-remove' ) ) . toHaveClass ( 'custom-close' ) ;
800
+ expect ( container . querySelector ( '.rc-tabs-tab-remove' ) ) . toHaveStyle ( { background : 'red' } ) ;
801
+ } ) ;
778
802
} ) ;
You can’t perform that action at this time.
0 commit comments