s3si.ts/gui/src/components/Header.tsx

15 lines
433 B
TypeScript
Raw Normal View History

2023-03-08 09:55:23 -05:00
import React from 'react'
import { AiOutlineLeft } from 'react-icons/ai';
import { useNavigate } from 'react-router-dom';
type HeaderProps = {
title?: React.ReactNode
}
export const Header: React.FC<HeaderProps> = ({ title }) => {
const navigate = useNavigate();
return <>
2024-01-30 05:54:45 -05:00
<h2 className="card-title" data-tauri-drag-region><button type='button' onClick={() => navigate(-1)}><AiOutlineLeft /></button>{title}</h2>
2023-03-08 09:55:23 -05:00
</>
}