@@ -14,66 +14,70 @@ type APITableProps = {
14
14
15
15
export const APITable = component$ ( ( { propDescriptors } : APITableProps ) => {
16
16
return (
17
- < table class = "w-full min-w-[540px] border-b border-gray-700 text-left sm:min-w-full" >
18
- < tbody class = "divide-y divide-gray-700" >
19
- < tr class = "w-1/4 text-white" >
20
- < td class = "w-1/6 whitespace-nowrap py-2 pl-4 text-sm font-medium sm:pl-0" >
21
- Prop
22
- </ td >
23
- < td class = "w-1/6 whitespace-nowrap py-2 text-sm font-medium" > Type</ td >
24
- < td class = "w-2/3 whitespace-nowrap py-2 text-sm font-medium" >
25
- Description
26
- </ td >
27
- </ tr >
28
- { propDescriptors ?. map ( ( propDescriptor ) => {
29
- return (
30
- < tr key = { propDescriptor . name } >
31
- < td class = "prose prose-sm py-3 pl-4 align-baseline sm:pl-0 " >
32
- < code > { propDescriptor . name } </ code >
33
- </ td >
34
- < td class = "prose prose-sm py-3 align-baseline" >
35
- < span class = "flex items-center" >
36
- < code > { propDescriptor . type } </ code >
37
- { propDescriptor . info && (
38
- < Popover placement = "top" >
39
- < PopoverContent >
40
- < div class = "bg-[#202425] text-[#7881fa] max-w-xs mb-2 text-md px-4 py-2 rounded-md" >
41
- { propDescriptor ?. info }
42
- </ div >
43
- </ PopoverContent >
44
- < PopoverTrigger >
45
- < div class = "hover:bg-slate-500 hover:bg-opacity-50 h-[31px] mt-2 p-2 rounded-md" >
46
- < svg
47
- width = "15"
48
- height = "15"
49
- viewBox = "0 0 15 15"
50
- fill = "none"
51
- xmlns = "http://www.w3.org/2000/svg"
52
- aria-hidden = "true"
53
- focusable = "false"
54
- >
55
- < path
56
- d = "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z"
57
- fill = "currentColor"
58
- fill-rule = "evenodd"
59
- clip-rule = "evenodd"
60
- > </ path >
61
- </ svg >
62
- </ div > { ' ' }
63
- </ PopoverTrigger >
64
- </ Popover >
65
- ) }
66
- </ span >
67
- </ td >
68
- < td class = "py-3 align-baseline" >
69
- < div class = "prose prose-sm prose-docs-table" >
70
- < p > { propDescriptor . description } </ p >
71
- </ div >
72
- </ td >
73
- </ tr >
74
- ) ;
75
- } ) }
76
- </ tbody >
77
- </ table >
17
+ < div class = "overflow-auto" >
18
+ < table class = "w-full min-w-[540px] border-b border-gray-700 text-left sm:min-w-full" >
19
+ < tbody class = "divide-y divide-gray-700" >
20
+ < tr class = "w-1/4 text-white" >
21
+ < td class = "w-1/6 whitespace-nowrap py-2 pl-4 text-sm font-medium sm:pl-0" >
22
+ Prop
23
+ </ td >
24
+ < td class = "w-1/6 whitespace-nowrap py-2 text-sm font-medium" >
25
+ Type
26
+ </ td >
27
+ < td class = "w-2/3 whitespace-nowrap py-2 text-sm font-medium" >
28
+ Description
29
+ </ td >
30
+ </ tr >
31
+ { propDescriptors ?. map ( ( propDescriptor ) => {
32
+ return (
33
+ < tr key = { propDescriptor . name } >
34
+ < td class = "prose prose-sm py-3 pl-4 align-baseline sm:pl-0 " >
35
+ < code > { propDescriptor . name } </ code >
36
+ </ td >
37
+ < td class = "prose prose-sm py-3 align-baseline" >
38
+ < span class = "flex items-center" >
39
+ < code > { propDescriptor . type } </ code >
40
+ { propDescriptor . info && (
41
+ < Popover placement = "top" >
42
+ < PopoverContent >
43
+ < div class = "bg-[#202425] text-[#7881fa] max-w-xs mb-2 text-md px-4 py-2 rounded-md" >
44
+ { propDescriptor ?. info }
45
+ </ div >
46
+ </ PopoverContent >
47
+ < PopoverTrigger >
48
+ < div class = "hover:bg-slate-500 hover:bg-opacity-50 h-[31px] mt-2 p-2 rounded-md" >
49
+ < svg
50
+ width = "15"
51
+ height = "15"
52
+ viewBox = "0 0 15 15"
53
+ fill = "none"
54
+ xmlns = "http://www.w3.org/2000/svg"
55
+ aria-hidden = "true"
56
+ focusable = "false"
57
+ >
58
+ < path
59
+ d = "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z"
60
+ fill = "currentColor"
61
+ fill-rule = "evenodd"
62
+ clip-rule = "evenodd"
63
+ > </ path >
64
+ </ svg >
65
+ </ div > { ' ' }
66
+ </ PopoverTrigger >
67
+ </ Popover >
68
+ ) }
69
+ </ span >
70
+ </ td >
71
+ < td class = "py-3 align-baseline" >
72
+ < div class = "prose prose-sm prose-docs-table" >
73
+ < p > { propDescriptor . description } </ p >
74
+ </ div >
75
+ </ td >
76
+ </ tr >
77
+ ) ;
78
+ } ) }
79
+ </ tbody >
80
+ </ table >
81
+ </ div >
78
82
) ;
79
83
} ) ;
0 commit comments