2023-10-30 23:57:10 +01:00
|
|
|
import { Block, BlockTypes } from "@/components/Block";
|
|
|
|
|
import { Title } from "@/components/Title";
|
2023-11-06 23:48:24 +01:00
|
|
|
import { Button } from "@/components/Button";
|
2023-10-30 23:57:10 +01:00
|
|
|
|
2023-12-02 18:26:24 +01:00
|
|
|
type HeaderProps = {
|
2023-12-02 23:51:56 +01:00
|
|
|
children?: React.ReactNode;
|
2023-12-02 18:26:24 +01:00
|
|
|
onWalletConnect?: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const Header: React.FunctionComponent<HeaderProps> = (props) => {
|
2023-10-30 23:57:10 +01:00
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Block className="mb-5" type={BlockTypes.FlexHorizontal}>
|
2023-12-02 23:51:56 +01:00
|
|
|
<Title>Waku</Title>
|
2023-12-02 18:26:24 +01:00
|
|
|
{props.onWalletConnect && (
|
|
|
|
|
<Button onClick={props.onWalletConnect}>
|
|
|
|
|
Connect Wallet
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
2023-10-30 23:57:10 +01:00
|
|
|
</Block>
|
2023-12-02 23:51:56 +01:00
|
|
|
{props.children}
|
2023-10-30 23:57:10 +01:00
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|