mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 07:36:37 +08:00
prettier
This commit is contained in:
@@ -1,39 +1,42 @@
|
||||
import * as React from "react"
|
||||
import { cn } from "@/lib/utils"
|
||||
import * as React from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const DocsTable = React.forwardRef<
|
||||
HTMLTableElement,
|
||||
React.HTMLAttributes<HTMLTableElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<div className="w-full overflow-x-auto rounded-lg border border-border/50">
|
||||
<div className='w-full overflow-x-auto rounded-lg border border-border/50'>
|
||||
<table
|
||||
ref={ref}
|
||||
className={cn("min-w-full text-sm text-left !my-0", className)}
|
||||
className={cn('min-w-full text-sm text-left !my-0', className)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
DocsTable.displayName = "DocsTable"
|
||||
));
|
||||
DocsTable.displayName = 'DocsTable';
|
||||
|
||||
const DocsTableHeader = React.forwardRef<
|
||||
HTMLTableSectionElement,
|
||||
React.HTMLAttributes<HTMLTableSectionElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<thead ref={ref} className={cn("bg-muted/50 text-muted-foreground font-medium border-b border-border/50", className)} {...props} />
|
||||
))
|
||||
DocsTableHeader.displayName = "DocsTableHeader"
|
||||
<thead
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'bg-muted/50 text-muted-foreground font-medium border-b border-border/50',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
DocsTableHeader.displayName = 'DocsTableHeader';
|
||||
|
||||
const DocsTableBody = React.forwardRef<
|
||||
HTMLTableSectionElement,
|
||||
React.HTMLAttributes<HTMLTableSectionElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<tbody
|
||||
ref={ref}
|
||||
className={cn("bg-background", className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
DocsTableBody.displayName = "DocsTableBody"
|
||||
<tbody ref={ref} className={cn('bg-background', className)} {...props} />
|
||||
));
|
||||
DocsTableBody.displayName = 'DocsTableBody';
|
||||
|
||||
const DocsTableRow = React.forwardRef<
|
||||
HTMLTableRowElement,
|
||||
@@ -41,11 +44,14 @@ const DocsTableRow = React.forwardRef<
|
||||
>(({ className, ...props }, ref) => (
|
||||
<tr
|
||||
ref={ref}
|
||||
className={cn("transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted border-b border-border/50 last:border-0", className)}
|
||||
className={cn(
|
||||
'transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted border-b border-border/50 last:border-0',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
DocsTableRow.displayName = "DocsTableRow"
|
||||
));
|
||||
DocsTableRow.displayName = 'DocsTableRow';
|
||||
|
||||
const DocsTableHead = React.forwardRef<
|
||||
HTMLTableCellElement,
|
||||
@@ -54,13 +60,13 @@ const DocsTableHead = React.forwardRef<
|
||||
<th
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"pl-6 pr-4 py-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 first:pl-6 last:pr-6",
|
||||
className
|
||||
'pl-6 pr-4 py-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 first:pl-6 last:pr-6',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
DocsTableHead.displayName = "DocsTableHead"
|
||||
));
|
||||
DocsTableHead.displayName = 'DocsTableHead';
|
||||
|
||||
const DocsTableCell = React.forwardRef<
|
||||
HTMLTableCellElement,
|
||||
@@ -68,11 +74,14 @@ const DocsTableCell = React.forwardRef<
|
||||
>(({ className, ...props }, ref) => (
|
||||
<td
|
||||
ref={ref}
|
||||
className={cn("pl-6 pr-4 py-2 align-middle [&:has([role=checkbox])]:pr-0 first:pl-6 last:pr-6", className)}
|
||||
className={cn(
|
||||
'pl-6 pr-4 py-2 align-middle [&:has([role=checkbox])]:pr-0 first:pl-6 last:pr-6',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
DocsTableCell.displayName = "DocsTableCell"
|
||||
));
|
||||
DocsTableCell.displayName = 'DocsTableCell';
|
||||
|
||||
export {
|
||||
DocsTable,
|
||||
@@ -81,4 +90,4 @@ export {
|
||||
DocsTableHead,
|
||||
DocsTableRow,
|
||||
DocsTableCell,
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user