// ts-nocheck import React, { FC, memo } from 'react'; import { Tooltip } from '../../..'; import { cn } from '../../util/bem'; import { Span } from '../span/span.component'; import { Wrapper } from '../wrapper/wrapper.component'; import './input-table-item.component.scss'; export type InputTableItemPropsType = { className?: string; label: string; style?: React.CSSProperties; before?: React.ReactNode; after?: React.ReactNode; onHoverAfter?: boolean; onMouseEnter?: () => void; onMouseLeave?: () => void; tooltipTitle?: string tooltipContent?: string tooltipMenuWidth?: string viewType?: 'primary' | 'secondary'; children?: React.ReactNode; } const className = cn('input-table-item'); export const InputTableItem: FC = memo(((props) => (
{ props.label }
{ props.before && (
{ props.before }
) } { React.Children?.map(props.children, (child) => ( React.isValidElement(child) ? React.cloneElement(child, { ...child.props, margin: 'off' }) : null)) } { props.after && (
{ props.after }
) }
))); InputTableItem.defaultProps = { viewType: 'primary' };