Docyrus

TimeEntryList

A reusable mobile list for time entries with app-controlled localized labels.

iOSAndroid
Preview TimeEntryList on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-time-entry-list

Usage

import { TimeEntryList } from '@/components/docyrus-native/time-entry-list';

<TimeEntryList entries={entries} onEntryPress={openEntry} />

All copy falls back to t('ui.timeEntryList.*') from <UiTranslationProvider> (English defaults below). Pass messages to override individual labels:

<TimeEntryList
  entries={entries}
  messages={{ empty: 'Nothing logged this week', statusLabels: { running: 'Live' } }}
/>

Dates render through dateFormatter when given, else the mounted DateFormatProvider's formatDateTime, else Intl (MMM d, HH:mm in the device locale).

API Reference

TimeEntryListProps

PropTypeDefaultDescription
entriesTimeEntryListItem[]—Time entry rows to render
messagesTimeEntryListMessagesInput—App-supplied copy; every key optional, wins over the translation provider
isLoadingbooleanfalseShows loading state
emptyMessagestring—Optional empty state override
size'sm' | 'md''md'Controls row density
showStatusbooleantrueDisplays the status chip
showBillablebooleantrueDisplays the billable/non-billable chip
onEntryPress(entry: TimeEntryListItem) => void—Row press handler
dateFormatter(date: string) => string—Overrides the date formatting (wins over DateFormatProvider)
classNamestring—Additional wrapper classes
contentContainerClassNamestring—Additional content container classes

TimeEntryListMessages

messages accepts TimeEntryListMessagesInput — the same fields, all optional (statusLabels is a Partial).

FieldTypeFallback keyEnglish fallback
loadingstringui.timeEntryList.loadingLoading time entries...
emptystringui.timeEntryList.emptyNo time entries yet
billablestringui.timeEntryList.billableBillable
nonBillablestringui.timeEntryList.nonBillableNon-billable
statusLabels.draftstringui.timeEntryList.statusDraftDraft
statusLabels.submittedstringui.timeEntryList.statusSubmittedSubmitted
statusLabels.approvedstringui.timeEntryList.statusApprovedApproved
statusLabels.rejectedstringui.timeEntryList.statusRejectedRejected
statusLabels.runningstringui.timeEntryList.statusRunningRunning
statusLabels.completedstringui.timeEntryList.statusCompletedCompleted

Components

ComponentDescription
TimeEntryListFlashList-backed time entry feed

Type Exports

TypeDescription
TimeEntryListPropsProps for TimeEntryList
TimeEntryListItemA time entry row
TimeEntryListStatus'draft' | 'submitted' | 'approved' | 'rejected' | 'running' | 'completed'
TimeEntryListSize'sm' | 'md'
TimeEntryListMessagesFull copy shape
TimeEntryListMessagesInputPartial messages prop shape

On this page