Files
signoz/frontend/src/components/TanStackTableView/TanStackTableText.tsx
Vinicius Lourenço b55ae83993
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
feat(tanstack-table): promote logs table component to /components (#10946)
* refactor(tanstack): move table to components & convert to css modules

* refactor(table): extract table to own component

* refactor(table): optimize

* chore(tests): cleanup tests and components

* fix(styles): minor fixes on styles

* fix(tests): use find by text

* fix(row): missing active styles

* refactor(tanstack-table): refine component based on infra monitoring

* docs(tanstacktable): add more docs about usage

* refactor(table): cleanup and fixes related to column and old preferences of logs

* refactor(table): more cleanup

* refactor(table): removed deprecated api

* fix(tanstack): more cleanup

* fix(sonner): removed old dependency

* fix(resizing): better resizing support

* fix(tanstack-header-row): use our version of popover

* fix(column-view): remove unused file

* fix(oxlint): alerts and issues

* fix(test): rollback aria-sort and rename to data-sort
2026-04-24 10:44:13 +00:00

43 lines
882 B
TypeScript

import type { HTMLAttributes, ReactNode } from 'react';
import cx from 'classnames';
import tableStyles from './TanStackTable.module.scss';
type BaseProps = Omit<
HTMLAttributes<HTMLSpanElement>,
'children' | 'dangerouslySetInnerHTML'
> & {
className?: string;
};
type WithChildren = BaseProps & {
children: ReactNode;
dangerouslySetInnerHTML?: never;
};
type WithDangerousHtml = BaseProps & {
children?: never;
dangerouslySetInnerHTML: { __html: string };
};
export type TanStackTableTextProps = WithChildren | WithDangerousHtml;
function TanStackTableText({
children,
className,
dangerouslySetInnerHTML,
...rest
}: TanStackTableTextProps): JSX.Element {
return (
<span
className={cx(tableStyles.tableCellText, className)}
dangerouslySetInnerHTML={dangerouslySetInnerHTML}
{...rest}
>
{children}
</span>
);
}
export default TanStackTableText;