import { ReactNode } from 'react'; import { classNames } from '@/shared/lib/classNames/classNames'; import cls from './Cell.module.scss'; interface CellProps { className?: string; label?: string; withoutBorder?: boolean; fieldError?: any; noteText?: ReactNode; children: ReactNode; } export const Cell = (props: CellProps) => { const { className, label, withoutBorder, fieldError, noteText, children } = props; return (
{!withoutBorder && (
{children}
)} {noteText &&
{noteText}
} {withoutBorder && children} {fieldError &&
{fieldError.message || 'Заполните поле'}
}
); };