added menu bar

This commit is contained in:
Djeeberjr 2021-11-15 22:07:41 +01:00
parent cfbb358115
commit 4273b5c8ca
5 changed files with 30 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import AllDecks from './AllDecks'; import AllDecks from './AllDecks';
import MenuBar from './MenuBar';
function App() { function App() {
// const [CTDeck,setCTDeck] = useState<Deck>(new Deck( // const [CTDeck,setCTDeck] = useState<Deck>(new Deck(
@ -14,6 +15,7 @@ function App() {
return ( return (
<div className="text-white"> <div className="text-white">
<MenuBar />
<AllDecks /> <AllDecks />
</div> </div>
); );

View File

@ -38,7 +38,7 @@ const CardGroupComp: React.FC<Props> = ({cardGroup,side,onChange,onRemove}) => {
/> />
)} )}
<div <div
className="bg-gray-600 m-1 p-1 cursor-pointer my-auto" className="bg-gray-600 my-auto button"
onClick={()=>onChange?.( onClick={()=>onChange?.(
new CardGroup( new CardGroup(
cardGroup.numInDeck, cardGroup.numInDeck,

View File

@ -42,7 +42,7 @@ const DeckComp: React.FC<Props> = ({deck,side,title,onChange}) => {
}} }}
/> />
)} )}
<div className="bg-gray-700 m-1 p-1 cursor-pointer my-auto" <div className="bg-gray-700 button my-auto"
onClick={()=>onChange?.( onClick={()=>onChange?.(
new Deck( new Deck(
deck.numDefusers, deck.numDefusers,

View File

@ -0,0 +1,22 @@
import React from "react"
interface Props {
onExport?: ()=>void
}
const MenuBar: React.FC<Props> = ({onExport}) => {
return (
<div className="bg-gray-800 h-10 m-1 p-1 flex">
<div className="bg-gray-700 button" onClick={onExport}>
Export
</div>
<a href="https://developer.valvesoftware.com/wiki/CS:GO_Game_Mode_-_Retakes" target="_blank" rel='noreferrer'>
<div className="bg-gray-700 button">
Help
</div>
</a>
</div>
)
}
export default MenuBar

View File

@ -5,3 +5,7 @@
.min-h-card { .min-h-card {
min-height: 10rem; min-height: 10rem;
} }
.button {
@apply py-1 px-2 mx-2 hover:bg-gray-900 cursor-pointer
}