@@ -4,7 +4,6 @@ import { useDropComponent } from '~hooks/useDropComponent'
44import {
55 Box ,
66 Table ,
7- TableCaption ,
87 TableContainer ,
98 Tbody ,
109 Tfoot ,
@@ -47,18 +46,18 @@ const acceptedTypesTable: ComponentType[] = [
4746]
4847
4948export const TablePreview = ( { component } : IPreviewProps ) => {
50- const { props, ref } = useInteractive ( component , true )
49+ const { props, ref } = useInteractive ( component , true , true )
5150 const { drop, isOver } = useDropComponent ( component . id , acceptedTypesTable )
5251
53- let boxProps : any = { }
52+ let boxProps : any = { border : '1px solid red' }
5453
5554 if ( isOver ) {
5655 props . bg = 'teal.50'
5756 }
5857
5958 return (
60- < Box ref = { drop ( ref ) } { ...boxProps } >
61- < Table { ...props } >
59+ < Box ref = { drop ( ref ) } { ...props } border = "1px solid green" >
60+ < Table { ...component . props } >
6261 { component . children . map ( ( key : string ) => (
6362 < ComponentPreview key = { key } componentName = { key } />
6463 ) ) }
@@ -89,19 +88,21 @@ export const TheadPreview = ({ component }: IPreviewProps) => {
8988const acceptedTypesTr : ComponentType [ ] = [ 'Th' , 'Td' ]
9089
9190export const TrPreview = ( { component } : IPreviewProps ) => {
92- const { props, ref } = useInteractive ( component , true )
91+ const { props, ref } = useInteractive ( component , true , true )
9392 const { drop, isOver } = useDropComponent ( component . id , acceptedTypesTr )
9493
9594 if ( isOver ) {
9695 props . bg = 'teal.50'
9796 }
9897
9998 return (
100- < Tr ref = { drop ( ref ) } { ...props } >
101- { component . children . map ( ( key : string ) => (
102- < ComponentPreview key = { key } componentName = { key } />
103- ) ) }
104- </ Tr >
99+ < Box ref = { drop ( ref ) } { ...props } border = "1px solid green" >
100+ < Tr { ...component . props } >
101+ { component . children . map ( ( key : string ) => (
102+ < ComponentPreview key = { key } componentName = { key } />
103+ ) ) }
104+ </ Tr >
105+ </ Box >
105106 )
106107}
107108
0 commit comments