Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useLightningTimeClock hook #13

Merged
merged 6 commits into from
Nov 14, 2023
Merged

Add useLightningTimeClock hook #13

merged 6 commits into from
Nov 14, 2023

Conversation

MatthewStanciu
Copy link
Member

@MatthewStanciu MatthewStanciu commented Sep 23, 2023

This PR adds a React Hook called useLightningTimeClock, which generates an efficient Lightning Time clock. It's super easy to use in a React app:

import { useLightningTimeClock } from '@purduehackers/time/react'

export default function MyComponent() {
  const { lightningTimeClock, normalTimeClock, timeColors } = useLightningTimeClock()

  return (
    <p>{lightningTimeClock}</p>
  ) 
}

@MatthewStanciu MatthewStanciu changed the title Add useLightningTime hook Add useLightningTimeClock hook Sep 23, 2023
@MatthewStanciu MatthewStanciu marked this pull request as ready for review November 14, 2023 16:27
@MatthewStanciu MatthewStanciu merged commit 3dd55bc into main Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant