@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
10 lines (9 loc) • 1.19 kB
JavaScript
import { jsxs as _jsxs } from "react/jsx-runtime";
import { StylePreview } from '../../components/StylePreview';
import { Flex } from '../../components/Flex';
import { cn } from '../../lib/utils';
export const FLASHING_CELL_STYLE_PREVIEW_CLASS = 'twa:!mt-0 twa:w-[5.5rem] twa:max-w-[5.5rem] twa:shrink-0 twa:!px-1.5 twa:!py-1 twa:text-2 twa:truncate';
export const FlashingCellStyle = (props) => {
const { data, className, ...flexProps } = props;
return (_jsxs(Flex, { flexDirection: "row", alignItems: "stretch", className: cn('twa:gap-1 twa:min-w-0', className), ...flexProps, children: [_jsxs(StylePreview, { "data-value": "up-style", styleObject: data.UpChangeStyle, className: FLASHING_CELL_STYLE_PREVIEW_CLASS, children: ["Up", !data.UpChangeStyle ? ' - none' : ''] }), _jsxs(StylePreview, { "data-value": "down-style", styleObject: data.DownChangeStyle, className: FLASHING_CELL_STYLE_PREVIEW_CLASS, children: ["Down", !data.DownChangeStyle ? ' - none' : ''] }), _jsxs(StylePreview, { "data-value": "neutral-style", styleObject: data.NeutralChangeStyle, className: FLASHING_CELL_STYLE_PREVIEW_CLASS, children: ["Neutral", !data.NeutralChangeStyle ? ' - none' : ''] })] }));
};