UNPKG

@porsche-design-system/components-react

Version:

Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.

32 lines (29 loc) 1.01 kB
"use client"; import { jsx } from 'react/jsx-runtime'; import { forwardRef, useRef } from 'react'; import { usePrefix, useMergedClass } from '../../hooks.mjs'; import { syncRef } from '../../utils.mjs'; import { DSRTableHeadRow } from '../dsr-components/table-head-row.mjs'; const PTableHeadRow = /*#__PURE__*/ forwardRef(({ className, children, ...rest }, ref) => { const elementRef = useRef(undefined); const WebComponentTag = usePrefix('p-table-head-row'); const props = { ...rest, // @ts-ignore ...(!process.browser ? { ...{ "role": "row" }, children: (jsx(DSRTableHeadRow, { children })), } : { children, suppressHydrationWarning: true, }), 'data-ssr': '', class: useMergedClass(elementRef, className), ref: syncRef(elementRef, ref) }; // @ts-ignore return jsx(WebComponentTag, { ...props }); }); export { PTableHeadRow };