Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable no-magic-numbers */
import React, { CSSProperties, useMemo } from 'react';
import { HEIGHT_TO_PX } from '@airbnb/lunar/lib/components/DataTable/constants';
import { RendererProps } from '@airbnb/lunar/lib/components/DataTable/types';
import { NumberFormatter } from '@superset-ui/number-format';
import { TimeFormatter } from '@superset-ui/time-format';
import HTMLRenderer from './components/HTMLRenderer';
const NEGATIVE_COLOR = '#FFA8A8';
const POSITIVE_COLOR = '#ced4da';
const SELECTION_COLOR = '#EBEBEB';
const NOOP = () => {};
const HEIGHT = HEIGHT_TO_PX.micro;
export type ColumnType = {
key: string;
label: string;
format?: NumberFormatter | TimeFormatter | undefined;
type: 'metric' | 'string';
maxValue?: number;
minValue?: number;
};
export type Cell = {
key: string;
value: any;
};
const NUMBER_STYLE: CSSProperties = {