import React from 'react';
import { TimeView as FieldsTimeView, type Time } from '@wix/patterns-fields';
import type { CellViewProps } from '../../types';
import { CellViewLayout } from '../CellViewLayout';

export const TimeView: React.FC<CellViewProps<Time | null>> = ({ value }) => (
  <CellViewLayout>
    <FieldsTimeView data={value ?? undefined} dataHook="time-view" />
  </CellViewLayout>
);
