Skip to content

Commit

Permalink
feat: Add initial components and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Marpfie committed Jan 17, 2025
1 parent 07d7252 commit 27be5a5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/components/button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { PropsWithChildren } from "react"

interface IButtonProps extends PropsWithChildren {
onClick?: () => void
}

export const Button = (props: IButtonProps) => {
const { onClick, children } = props

return (
<button className="font-bold text-xl" onClick={onClick}>
{children}
</button>
)
}
1 change: 1 addition & 0 deletions src/routes/timer/components/lap.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const Lap = () => <b>I'm going to display a lap time in the future</b>
7 changes: 7 additions & 0 deletions src/routes/timer/components/timerDisplay.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { useState } from "react"

export const TimerDisplay = () => {
const [time] = useState(0)

return <div className="flex justify-center text-9xl m-6">{time}</div>
}
15 changes: 14 additions & 1 deletion src/routes/timer/timer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
import { Button } from "../../components/button"
import { TimerDisplay } from "./components/timerDisplay"

export const Timer = () => {
return <h1 className="underline">Quick Tailwind Test</h1>
return (
<>
<h1 className="flex justify-center text-5xl m-6">Trial Timer</h1>
<TimerDisplay />
<div className="grid grid-cols-3 gap-3">
<Button>Start</Button>
<Button>Reset</Button>
<Button>Lap</Button>
</div>
</>
)
}

0 comments on commit 27be5a5

Please sign in to comment.