-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
708 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import { useState } from "react"; | ||
import "./styles.scss"; | ||
|
||
export default function Bag() { | ||
const [open, setOpen] = useState(false); | ||
|
||
const [showItemAction, setShowItemAction] = useState<number>(); | ||
|
||
return ( | ||
<div className="mi-bag-wrapper"> | ||
<button className="mi-bag-button" onClick={() => setOpen(true)}> | ||
Bag | ||
</button> | ||
{open && ( | ||
<div className="mi-bag-backdrop"> | ||
<div className="mi-bag-modal"> | ||
<div className="mi-bag-modal-character"> | ||
<div className="mi-bag-modal-character-info"> | ||
<div className="mi-bag-character-info-avatar">MIS</div> | ||
<div className="mi-bag-character-info-detail"> | ||
<div>Mississippi</div> | ||
<div>HP: 150</div> | ||
<div>ATK: 50</div> | ||
<div>Range: 3</div> | ||
<div>Speed: 5</div> | ||
<div>Weight: 20</div> | ||
<div>Pocket: 30</div> | ||
</div> | ||
</div> | ||
<div className="mi-bag-equip"> | ||
<p>Equipment</p> | ||
<div className="mi-bag-equip-list"> | ||
<div className="mi-bag-equip-list-item"></div> | ||
<div className="mi-bag-equip-list-item"></div> | ||
<div className="mi-bag-equip-list-item"></div> | ||
<div className="mi-bag-equip-list-item"></div> | ||
</div> | ||
</div> | ||
|
||
<div className="mi-bag-equip"> | ||
<p>Element</p> | ||
<div | ||
className="mi-bag-equip-list" | ||
style={{ | ||
justifyContent: "flex-start", | ||
}} | ||
> | ||
<div | ||
className="mi-bag-equip-list-item" | ||
style={{ | ||
marginRight: "15%", | ||
}} | ||
></div> | ||
<div className="mi-bag-equip-list-item"></div> | ||
</div> | ||
</div> | ||
|
||
<div className="mi-bag-modal-character-action"> | ||
<button>Again</button> | ||
<button>lets rock</button> | ||
</div> | ||
|
||
<div className="mi-bag-modal-character-action"> | ||
<button onClick={() => setOpen(false)}>Close</button> | ||
</div> | ||
</div> | ||
<div className="mi-bag-modal-divider"></div> | ||
<div className="mi-bag-modal-bag-list"> | ||
{new Array(20).fill(1).map((item, index) => ( | ||
<div | ||
className="mi-bag-modal-bag-list-item" | ||
onClick={() => setShowItemAction(index)} | ||
> | ||
{showItemAction === index && ( | ||
<div className="mi-bag-modal-bag-list-item-action"> | ||
<div className="mi-bag-modal-bag-list-item-action-element-name"> | ||
<div>item name</div> | ||
<div>weight: 999</div> | ||
</div> | ||
<div className="mi-bag-modal-bag-list-item-action-element-desc"> | ||
<div>item desc</div> | ||
</div> | ||
<div className="mi-bag-modal-bag-list-item-action-button"> | ||
<button>Remove</button> | ||
<button>Discard</button> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
@import "../../theme"; | ||
|
||
.mi-bag-wrapper { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
|
||
.mi-bag-button { | ||
position: fixed; | ||
right: 24px; | ||
bottom: 120px; | ||
font-size: 1.5rem; | ||
padding: 24px; | ||
} | ||
|
||
.mi-bag-backdrop { | ||
overflow: hidden; | ||
left: 0; | ||
top: 0; | ||
position: fixed; | ||
height: 100vh; | ||
width: 100vw; | ||
background: rgba($color: #000000, $alpha: 0.6); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
.mi-bag-modal { | ||
min-width: 500px; | ||
height: 600px; | ||
background-color: #d9d9d9; | ||
display: flex; | ||
padding: 48px; | ||
align-items: center; | ||
|
||
&-character { | ||
min-width: 480px; | ||
|
||
&-info { | ||
display: flex; | ||
|
||
&-avatar { | ||
width: 64px; | ||
height: 64px; | ||
background: #eba66e; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 999px; | ||
} | ||
|
||
&-detail { | ||
display: flex; | ||
flex-direction: column; | ||
margin-left: 24px; | ||
row-gap: 6px; | ||
} | ||
} | ||
|
||
.mi-bag-equip { | ||
margin-top: 40px; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
&-list { | ||
margin-top: 12px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
&-item { | ||
border: 1px solid #000; | ||
width: 64px; | ||
height: 64px; | ||
border-radius: 12px; | ||
background: #fff; | ||
} | ||
} | ||
} | ||
|
||
&-action { | ||
margin-top: 48px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
button { | ||
border-radius: 12px; | ||
border: 1px solid #000; | ||
background: #79fb9d; | ||
margin-left: 24px; | ||
padding: 12px; | ||
font-size: 1rem; | ||
} | ||
} | ||
} | ||
|
||
&-divider { | ||
background: #000; | ||
width: 1px; | ||
height: 80%; | ||
margin: 0 24px; | ||
} | ||
|
||
&-bag-list { | ||
display: grid; | ||
grid-template-columns: repeat(5, 18%); | ||
grid-row-gap: 20px; | ||
grid-column-gap: 20px; | ||
|
||
&-item { | ||
width: 64px; | ||
height: 64px; | ||
background: #fff; | ||
border: 1px solid #000; | ||
border-radius: 12px; | ||
position: relative; | ||
|
||
&-action { | ||
background: rgba($color: #000000, $alpha: 0.9); | ||
display: flex; | ||
flex-direction: column; | ||
position: absolute; | ||
padding: 20px; | ||
bottom: -280%; | ||
left: 50%; | ||
color: #fff; | ||
z-index: 9; | ||
width: fit-content; | ||
min-width: 200px; | ||
|
||
&-element-name { | ||
display: flex; | ||
justify-content: space-between; | ||
bottom: 50px; | ||
} | ||
|
||
&-element-desc { | ||
margin-top: 24px; | ||
} | ||
|
||
&-button { | ||
margin-top: 48px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
column-gap: 20px; | ||
|
||
button { | ||
border-radius: 12px; | ||
border: 1px solid #000; | ||
background: #79fb9d; | ||
padding: 12px; | ||
font-size: 1rem; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.