Skip to content

Commit

Permalink
add names to side buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
memelotsqui committed Dec 5, 2023
1 parent d93a286 commit d0c6663
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export default function Editor({uploadTextureURL, uploadVRMURL,confirmDialog,ani
{templateInfo.traits &&
templateInfo.traits.map((item, index) => (
<div key={index} className={styles["selectorButton"]}>

<TokenBox
size={56}
resolution={2048}
Expand All @@ -118,6 +119,7 @@ export default function Editor({uploadTextureURL, uploadVRMURL,confirmDialog,ani
selectOption(item)
}}
/>
{item.name}
</div>
))}
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Editor.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.selector-container {
user-select: none;
flex: 1;
width: 110px;
width: 190px;
position: relative;
text-align: center;
}
Expand All @@ -33,6 +33,10 @@
padding: 0.15em;
display: block;
position: relative;
display: flex;
align-items: center;
color: #ffffff;
font-size: 10px;
}

.bottomLine {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Selector.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.SelectorContainerPos {
position: absolute;
top: 98px;
left: 180px;
left: 260px;
height: -webkit-calc(100vh - 176px);
height: calc(100vh - 176px);
backdrop-filter: blur(22.5px);
Expand Down
3 changes: 3 additions & 0 deletions src/components/token-box/TokenBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ export const TokenBox = (props) => {
style={{width: size, height: size}}
onClick={onClick}
>

{active && (
<div className={classnames(styles.frame, styles.frameActive)} />
)}
<div
className={classnames(styles.frame, rarity && styles[rarity])}
/>

<img src={icon} className={styles.emptyIcon} style={style}/>
{level && (
<div
Expand All @@ -35,6 +37,7 @@ export const TokenBox = (props) => {
Lv.{level}
</div>
)}

</div>
);
};

0 comments on commit d0c6663

Please sign in to comment.