Updated WeaponLabelIcon styles

This commit is contained in:
Justin Edmund 2023-06-30 22:18:25 -07:00
parent e35879d03c
commit 4f1bcf5bca
2 changed files with 10 additions and 2 deletions

View file

@ -1,4 +1,4 @@
.WeaponLabelIcon { .icon {
display: inline-block; display: inline-block;
background-size: 60px 25px; background-size: 60px 25px;
height: 25px; height: 25px;

View file

@ -1,5 +1,6 @@
import React from 'react' import React from 'react'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
import classNames from 'classnames'
import styles from './index.module.scss' import styles from './index.module.scss'
@ -10,7 +11,14 @@ interface Props {
const WeaponLabelIcon = (props: Props) => { const WeaponLabelIcon = (props: Props) => {
const router = useRouter() const router = useRouter()
return <i className={`WeaponLabelIcon ${props.labelType} ${router.locale}`} /> const classes = classNames({
[styles.icon]: true,
[styles[props.labelType]]: true,
[styles.en]: router.locale === 'en',
[styles.ja]: router.locale === 'ja',
})
return <i className={classes} />
} }
export default WeaponLabelIcon export default WeaponLabelIcon