All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.widgets.Table.cells.StatusCell.StatusCell.tsx Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
import React from 'react'
import get from 'lodash/get'

import { StatusText } from '../../../../snippets/StatusText/StatusText'
import { withTooltip } from '../../withTooltip'

import { type Props } from './types'

/**
 * Ячейка таблицы типа статус
 * @reactProps {string} id
 * @reactProps {object} model - модель данных
 * @reactProps {string} fieldKey - ключ модели для этой ячейки
 * @reactProps {string} color - цветовая схема бейджа(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "white"])
 * @example
 * 
 */

function StatusCellBody({
    id,
    className,
    color,
    fieldKey,
    textPosition,
    forwardedRef,
    visible = true,
    model,
}: Props) {
    if (!visible) { return null }

    const statusText = get(model, fieldKey || id) as string | undefined

    return (
        
) } export const StatusCell = withTooltip(StatusCellBody) export default StatusCell




© 2015 - 2025 Weber Informatics LLC | Privacy Policy