Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Conversation

@oneJ1
Copy link

@oneJ1 oneJ1 commented Jan 30, 2024

Added the following

StopWatch.tsx:

  • Stopwatch component now has the Start, Stop, Lap, and Reset buttons which are fully functional.
  • Start: Starts the stopwatch
  • Stop: Pauses the stopwatch
  • Lap: Adds a lap to the list which is composed of {index, lap time, general time}
  • Reset: Resets the stopwatch and the laps.

StopWatchButton.tsx:

  • Stopwatch's button component used dynamically for the functionalities in stopwatch
  • Can take in as input its action, onPress, height/width, color, borderColor, borderRadius, isDisabled, and hitslop
  • Reusable as is

types / ButtomProps.ts:

  • Holds the Props for the StopWatchButton component

types / LapItem.ts:

  • Holds the type of LapItem

types / StopwatchButtonActionTypes.ts:

  • Hold the type of the action types which the stopwatch can do

utils / formatTime.tsx:

  • Reusable function used in the Stopwatch component which returns the properly formatted time given the milliseconds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant