Quests closeable

This commit is contained in:
Anton 2023-07-23 09:57:40 +02:00
parent a39ff36e10
commit f8f0001ed7
2 changed files with 10 additions and 3 deletions

View File

@ -1,14 +1,17 @@
import * as React from 'react' import * as React from 'react'
export function Quests() { export function Quests() {
return (
const [open, setOpen] = React.useState(true);
if (open) return (
<> <>
<input type="checkbox" id="quests" className="tw-modal-toggle" /> <input type="checkbox" id="quests" className="tw-modal-toggle" />
<div className="tw-card tw-w-48 tw-bg-base-100 tw-shadow-xl tw-absolute tw-bottom-4 tw-left-4 tw-z-1000"> <div className="tw-card tw-w-48 tw-bg-base-100 tw-shadow-xl tw-absolute tw-bottom-4 tw-left-4 tw-z-1000">
<div className="tw-card-body tw-p-4 tw-pt-0"> <div className="tw-card-body tw-p-4 tw-pt-0">
<div className="tw-card-actions tw-justify-end"> <div className="tw-card-actions tw-justify-end">
<label className="tw-btn tw-btn-sm tw-btn-circle tw-btn-ghost tw-absolute tw-right-2 tw-top-2"></label> <label className="tw-btn tw-btn-sm tw-btn-circle tw-btn-ghost tw-absolute tw-right-2 tw-top-2" onClick={()=>setOpen(false)}></label>
</div> </div>
<h2 className="tw-card-title tw-m-auto ">Level 1</h2> <h2 className="tw-card-title tw-m-auto ">Level 1</h2>
<ul className='tw-flex-row'> <ul className='tw-flex-row'>
@ -21,4 +24,8 @@ export function Quests() {
</div> </div>
</> </>
) )
else return (
<></>
)
} }

View File

@ -11,7 +11,7 @@ interface TitleCardProps {
function TitleCard({title, children, topMargin, TopSideButtons} : TitleCardProps){ function TitleCard({title, children, topMargin, TopSideButtons} : TitleCardProps){
return( return(
<div className={"tw-card tw-w-full tw-p-6 tw-mb-8 tw-bg-base-100 tw-shadow-xl tw-h-fit " + (topMargin || "tw-mt-6")}> <div className={"tw-card tw-w-full tw-p-6 tw-mb-16 tw-bg-base-100 tw-shadow-xl tw-h-fit " + (topMargin || "tw-mt-6")}>
{/* Title for Card */} {/* Title for Card */}
<Subtitle styleClass={TopSideButtons ? "tw-inline-block" : ""}> <Subtitle styleClass={TopSideButtons ? "tw-inline-block" : ""}>