@shridey/intelligentable
Version:
Intelligentable is a highly customizable, fully-types, performant, and feature-rich React component library built on top of handpicked industry-level production-grade UI Components for modern web applications.
18 lines (17 loc) • 1.12 kB
TypeScript
import type { IntelligentTableColorConfigType } from "../../types/IntelligentTable/IntelligentTableColorConfigType";
/**
* Determines the color for a cell value based on provided color configuration rules.
*
* @param {IntelligentTableColorConfigType[]} configs - Array of color configuration rules.
* @param {number | string | null | undefined} value - The cell value to evaluate.
* @returns {string | undefined} The color to apply, or undefined if no rule matches.
*/
export declare const getColor: (configs: IntelligentTableColorConfigType[], value: number | string | null | undefined) => string | undefined;
/**
* Renders a span element with colored text based on color configuration rules.
*
* @param {string | number} value - The cell value to display.
* @param {IntelligentTableColorConfigType[]} colorConfig - Array of color configuration rules.
* @returns {JSX.Element} A span element with the appropriate text color applied.
*/
export declare const createIntelligentTableColoredText: (value: string | number, colorConfig: IntelligentTableColorConfigType[]) => import("react/jsx-runtime").JSX.Element;