-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTable.mjs
More file actions
30 lines (24 loc) · 743 Bytes
/
Table.mjs
File metadata and controls
30 lines (24 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// @ts-check
import classNameProp from "class-name-prop";
import React from "react";
/** CSS dependency URLs for the React component {@linkcode Table}. */
export const css = new Set([new URL("./Table.css", import.meta.url).href]);
/** React component for a {@link HTMLTableElement table}. */
const Table = React.forwardRef(
(
/**
* @type {React.ComponentPropsWithoutRef<"table">
* & { [dataAttribute: `data-${string}`]: unknown }}
*/
{ className, ...props },
/** @type {React.ForwardedRef<HTMLTableElement>} */
ref
) =>
React.createElement("table", {
className: classNameProp("daui-Table", className),
...props,
ref,
})
);
Table.displayName = "Table";
export default Table;