xonecas.io
523
Tc

the-champs-timer / files

the-champs-timer / src / components / header.tsx

944 bytes
1import {
2  AdjustmentsHorizontalIcon,
3  XMarkIcon,
4} from "@heroicons/react/24/solid";
5import React from "react";
6import Button from "./molecules/buttons";
7import { RowContainer } from "./molecules/containers";
8
9const Header: React.FC<{
10  isSettingsOpen: boolean;
11  handleSettingsOpen: () => void;
12}> = ({ isSettingsOpen, handleSettingsOpen }) => {
13  return (
14    <RowContainer className="p-4 border-b border-slate-400 dark:border-slate-600">
15      <h1 className="text-lg font-bold">
16        <img
17          src="/stopwatch-icon.svg"
18          alt="Stopwatch"
19          className="size-10 inline-block bottom-0.5 relative mr-4"
20        />
21        The Champ's Timer
22      </h1>
23
24      <Button onClick={handleSettingsOpen}>
25        {isSettingsOpen ? (
26          <XMarkIcon className="size-6" />
27        ) : (
28          <AdjustmentsHorizontalIcon className="size-6" />
29        )}
30      </Button>
31    </RowContainer>
32  );
33};
34
35export default Header;