Skip to content

Commit

Permalink
Color equip potential div by tier
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoretsu committed Jan 19, 2024
1 parent 95bfbdf commit b54a3e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
10 changes: 8 additions & 2 deletions src/app/characters/equips/components/Potential/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const extraLinesMap = new Map<string, Record<string, Map<number, any[]>>>([
["Weapon", weaponSecondaryLines],
]);

const tiers = ["", "Rare", "Epic", "Unique", "Legendary"];
// const tiers = ["Common", "Rare", "Epic", "Unique", "Legendary"];
const tierColors = ["#777777", "#55aaff", "#cc66ff", "#ffcc00", "#00ff00"];

export default function Potential({ equipLevel = 0, index, type }: PotentialProps) {
const { currentCharacter, updateCharacter } = useCharacters();
Expand Down Expand Up @@ -208,7 +209,12 @@ export default function Potential({ equipLevel = 0, index, type }: PotentialProp
};

return (
<section className={styles.equipSection}>
<section
className={styles.equipSection}
style={{
"--color": tierColors[tier],
}}
>
<button type="button" onClick={() => showPotential(old => !old)}>
Potential
</button>
Expand Down
12 changes: 0 additions & 12 deletions src/app/characters/equips/components/Potential/styles.module.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/characters/equips/components/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

width: 12.25rem;

border: 2px solid #ffffff;
border: 2px solid var(--color, #ffffff);
border-radius: 1rem;
margin-top: 0.5rem;

Expand Down

0 comments on commit b54a3e0

Please sign in to comment.