11import { component$ } from '@builder.io/qwik' ;
2- import { Popover , PopoverContent , PopoverTrigger } from '@qwik-ui/headless ' ;
2+ import { InfoPopup } from '../info-popup/info-popup ' ;
33type APITableProps = {
44 propDescriptors : {
55 name : string ;
@@ -12,62 +12,32 @@ type APITableProps = {
1212export const APITable = component$ ( ( { propDescriptors } : APITableProps ) => {
1313 return (
1414 < div class = "overflow-auto" >
15- < table class = "mb-6 w-full min-w-[540px] border-b border-slate-200 text-left dark:border-slate-800 sm:min-w-full" >
16- < tbody class = "divide-y divide-slate-200 dark:divide-slate-800 " >
17- < tr class = "w-1/4 dark:text-white " >
18- < th class = "w-1/6 whitespace-nowrap py-2 pl-4 text-base font-[600] font-medium text-slate-700 dark:text-slate-300 sm:pl-0" >
15+ < table class = "mb-6 w-full min-w-[540px] border-b text-left sm:min-w-full" >
16+ < tbody class = "divide-y" >
17+ < tr class = "w-1/4" >
18+ < th class = "w-1/6 whitespace-nowrap py-2 pl-4 text-base font-semibold sm:pl-0" >
1919 Prop
2020 </ th >
21- < th class = "w-1/6 whitespace-nowrap py-2 text-base font-[600] text-slate-700 dark:text-slate-300" >
22- Type
23- </ th >
24- < th class = "w-2/3 whitespace-nowrap p-2 text-base font-[600] text-slate-700 dark:text-slate-300" >
21+ < th class = "w-1/6 whitespace-nowrap py-2 text-base font-semibold" > Type</ th >
22+ < th class = "w-2/3 whitespace-nowrap p-2 text-base font-semibold" >
2523 Description
2624 </ th >
2725 </ tr >
2826 { propDescriptors ?. map ( ( propDescriptor ) => {
2927 return (
3028 < tr key = { propDescriptor . name } >
3129 < td class = "prose prose-sm py-3 pl-4 sm:pl-0 " >
32- < code class = "border-qwikui-blue-500 bg-qwikui-blue-50 dark:bg-qwikui-purple-100 dark:border-qwikui-purple-500 mr-6 rounded-md border-[1px] border-b-[2px] font-[400] text-slate-950 " >
30+ < code class = "border-primary mr-6 rounded-md border border-b-[2px]" >
3331 { propDescriptor . name }
3432 </ code >
3533 </ td >
3634 < td class = "py-3" >
37- < span class = "flex items-center" >
38- < code class = "rounded-md border-[1px] border-b-2 border-slate-700 bg-slate-100 px-2 dark:border-slate-400 dark:bg-slate-700 " >
35+ < div class = "flex items-center gap-2 " >
36+ < code class = "rounded-md border border-b-2 px-2" >
3937 { propDescriptor . type }
4038 </ code >
41- { propDescriptor . info && (
42- < Popover placement = "top" >
43- < PopoverContent >
44- < div class = "shadow-light-medium bg-qwikui-blue-50 dark:shadow-dark-high text-md border-qwikui-blue-500 dark:border-qwikui-purple-500 dark:bg-qwikui-purple-100 mb-2 max-w-xs rounded-lg border-[1px] border-b-2 px-3 py-2 font-[500] text-slate-950 sm:w-max" >
45- { propDescriptor ?. info }
46- </ div >
47- </ PopoverContent >
48- < PopoverTrigger >
49- < div class = "mx-2 mt-2 rounded-md rounded-xl p-1 hover:bg-slate-500 hover:bg-opacity-50" >
50- < svg
51- width = "15"
52- height = "15"
53- viewBox = "0 0 15 15"
54- fill = "none"
55- xmlns = "http://www.w3.org/2000/svg"
56- aria-hidden = "true"
57- focusable = "false"
58- >
59- < path
60- 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"
61- fill = "currentColor"
62- fill-rule = "evenodd"
63- clip-rule = "evenodd"
64- > </ path >
65- </ svg >
66- </ div > { ' ' }
67- </ PopoverTrigger >
68- </ Popover >
69- ) }
70- </ span >
39+ { propDescriptor . info && < InfoPopup info = { propDescriptor . info } /> }
40+ </ div >
7141 </ td >
7242 < td class = "py-3 align-baseline" >
7343 < div class = "prose prose-sm prose-docs-table px-2" >
0 commit comments