mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
Quests closeable
This commit is contained in:
parent
a39ff36e10
commit
f8f0001ed7
@ -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 (
|
||||||
|
<></>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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" : ""}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user