diff --git a/packages/libs/react-ui/src/components/Table/TBody.tsx b/packages/libs/react-ui/src/components/Table/TBody.tsx index d0acbba582..6963df4efd 100644 --- a/packages/libs/react-ui/src/components/Table/TBody.tsx +++ b/packages/libs/react-ui/src/components/Table/TBody.tsx @@ -5,11 +5,12 @@ import type { CompoundType } from './types'; export interface ITBodyProps { children?: CompoundType; + className?: string; } -export const TBody: FC = ({ children }) => { +export const TBody: FC = ({ children, className }) => { return ( - + {React.Children.map(children, (child) => { if ( !React.isValidElement(child) || diff --git a/packages/libs/react-ui/src/components/Table/THead.tsx b/packages/libs/react-ui/src/components/Table/THead.tsx index 72e3b23d8c..6f15894c31 100644 --- a/packages/libs/react-ui/src/components/Table/THead.tsx +++ b/packages/libs/react-ui/src/components/Table/THead.tsx @@ -5,11 +5,12 @@ import type { CompoundType } from './types'; export interface ITHeadProps { children?: CompoundType; + className?: string; } -export const THead: FC = ({ children }) => { +export const THead: FC = ({ children, className }) => { return ( - + {React.Children.map(children, (child) => { if ( !React.isValidElement(child) || diff --git a/packages/libs/react-ui/src/components/Table/Table.tsx b/packages/libs/react-ui/src/components/Table/Table.tsx index 4690a07fd6..57fbc822f4 100644 --- a/packages/libs/react-ui/src/components/Table/Table.tsx +++ b/packages/libs/react-ui/src/components/Table/Table.tsx @@ -11,15 +11,22 @@ import type { CompoundType } from './types'; export interface ITableProps extends Pick { children?: CompoundType | CompoundType; striped?: boolean; + className?: string; } -export const Table: FC = ({ children, striped, wordBreak }) => { +export const Table: FC = ({ + children, + striped, + wordBreak, + className, +}) => { return ( {React.Children.map(children, (child) => { diff --git a/packages/libs/react-ui/src/components/Table/Td.tsx b/packages/libs/react-ui/src/components/Table/Td.tsx index d565d173f7..8e359fd5ed 100644 --- a/packages/libs/react-ui/src/components/Table/Td.tsx +++ b/packages/libs/react-ui/src/components/Table/Td.tsx @@ -1,11 +1,13 @@ +import classNames from 'classnames'; import type { FC } from 'react'; import React from 'react'; import { tdClass } from './Table.css'; export interface ITdProps { children?: React.ReactNode; + className?: string; } -export const Td: FC = ({ children }) => { - return ; +export const Td: FC = ({ children, className }) => { + return ; }; diff --git a/packages/libs/react-ui/src/components/Table/Th.tsx b/packages/libs/react-ui/src/components/Table/Th.tsx index 8a3bef79be..11095bea5b 100644 --- a/packages/libs/react-ui/src/components/Table/Th.tsx +++ b/packages/libs/react-ui/src/components/Table/Th.tsx @@ -8,12 +8,23 @@ import { thClass } from './Table.css'; export interface IThProps extends Pick { children?: React.ReactNode; + className?: string; } -export const Th: FC = ({ children, width, minWidth, maxWidth }) => { +export const Th: FC = ({ + children, + width, + minWidth, + maxWidth, + className, +}) => { return ( diff --git a/packages/libs/react-ui/src/components/Table/Tr.tsx b/packages/libs/react-ui/src/components/Table/Tr.tsx index 7953c64ab9..7f95a86123 100644 --- a/packages/libs/react-ui/src/components/Table/Tr.tsx +++ b/packages/libs/react-ui/src/components/Table/Tr.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import type { FC } from 'react'; import React from 'react'; import { Link, SystemIcon } from '..'; @@ -11,11 +12,12 @@ export interface ITrProps { children?: CompoundType | CompoundType; url?: string; onClick?: React.MouseEventHandler; + className?: string; } -export const Tr: FC = ({ children, url, onClick }) => { +export const Tr: FC = ({ children, url, onClick, className }) => { return ( - + {React.Children.map(children, (child) => { if ( !React.isValidElement(child) ||
{children}{children} {children}