diff --git a/components/extra/ExtraContainer/index.module.scss b/components/extra/ExtraContainer/index.module.scss index 73865e6d..f3eb848b 100644 --- a/components/extra/ExtraContainer/index.module.scss +++ b/components/extra/ExtraContainer/index.module.scss @@ -1,50 +1,18 @@ -.ExtraContainer { +.container { background: var(--extra-purple-bg); border-radius: $card-corner; display: flex; + margin: $unit-4x auto 0; flex-direction: column; - position: relative; - left: $unit; - margin: 20px auto; - max-width: calc($grid-width + 20px); + max-width: calc($grid-width + $unit-2x); width: 100%; + // gap: $unit; - .ContainerItem { - display: grid; - grid-template-columns: 1.19fr 3fr; - gap: $unit-2x; - padding: $unit-2x $unit-2x $unit-2x; + & > * { + border-bottom: 2px solid var(--background); - &.Disabled { - grid-template-columns: 1fr; - - .Header { - flex-direction: row; - justify-content: space-between; - } - } - - .Header { - align-items: center; - display: flex; - flex-direction: row; - gap: $unit; - justify-content: center; - min-height: $unit-4x; - width: 100%; - - & > h3 { - color: var(--extra-purple-text); - font-size: $font-small; - font-weight: $medium; - line-height: 1.2; - font-weight: 500; - text-align: center; - } - } - - &:not(:first-child) { - border-top: 1px solid var(--extra-purple-card-bg); + &:last-child { + border-bottom: none; } } } diff --git a/components/extra/ExtraContainer/index.tsx b/components/extra/ExtraContainer/index.tsx index 86d61b56..a0b72327 100644 --- a/components/extra/ExtraContainer/index.tsx +++ b/components/extra/ExtraContainer/index.tsx @@ -1,11 +1,10 @@ import React, { PropsWithChildren } from 'react' import styles from './index.module.scss' -// Props interface Props {} -const ExtraContainer = ({ children, ...props }: PropsWithChildren) => { - return
{children}
+const ExtraContainer = (props: PropsWithChildren) => { + return
{props.children}
} export default ExtraContainer diff --git a/components/extra/ExtraContainerItem/index.module.scss b/components/extra/ExtraContainerItem/index.module.scss new file mode 100644 index 00000000..9807f50f --- /dev/null +++ b/components/extra/ExtraContainerItem/index.module.scss @@ -0,0 +1,47 @@ +.item { + position: relative; + + .header { + align-items: center; + display: flex; + flex-direction: row; + gap: $unit; + justify-content: center; + min-height: $unit-4x; + width: 100%; + + & > h3 { + color: var(--extra-purple-text); + font-size: $font-small; + font-weight: $medium; + line-height: 1.2; + font-weight: 500; + text-align: center; + } + } + + .content { + display: grid; + grid-template-columns: 1.19fr 3fr; + gap: $unit-2x; + padding: $unit-2x $unit-2x $unit-2x; + + @include breakpoint(phone) { + grid-template-columns: auto; + grid-template-rows: auto 1fr; + } + + &.Disabled { + grid-template-columns: 1fr; + + .Header { + flex-direction: row; + justify-content: space-between; + } + } + + &:not(:first-child) { + border-top: 1px solid var(--extra-purple-card-bg); + } + } +} diff --git a/components/extra/ExtraContainerItem/index.tsx b/components/extra/ExtraContainerItem/index.tsx new file mode 100644 index 00000000..dd5ad944 --- /dev/null +++ b/components/extra/ExtraContainerItem/index.tsx @@ -0,0 +1,35 @@ +import React, { PropsWithChildren } from 'react' +import classNames from 'classnames' +import styles from './index.module.scss' + +// Props +interface Props { + title: string + className?: string +} + +const ExtraContainerItem = ({ + title, + children, + ...props +}: PropsWithChildren) => { + const classes = classNames( + { + [styles.item]: true, + }, + props.className?.split(' ').map((c) => styles[c]) + ) + + return ( +
+
+
+

{title}

+
+ {children} +
+
+ ) +} + +export default ExtraContainerItem diff --git a/components/extra/ExtraWeaponsGrid/index.module.scss b/components/extra/ExtraWeaponsGrid/index.module.scss index e688f89f..38c8fa00 100644 --- a/components/extra/ExtraWeaponsGrid/index.module.scss +++ b/components/extra/ExtraWeaponsGrid/index.module.scss @@ -1,26 +1,14 @@ -.ExtraWeapons { - #ExtraWeaponGrid { - display: grid; - gap: $unit-3x; - grid-template-columns: repeat(3, minmax(0, 1fr)); +.grid { + display: grid; + gap: $unit-3x; + grid-template-columns: repeat(3, minmax(0, 1fr)); - @include breakpoint(tablet) { - gap: $unit-2x; - } + @include breakpoint(tablet) { + gap: $unit-2x; + } - @include breakpoint(phone) { - gap: $unit; - } - - .WeaponUnit { - .WeaponImage { - background: var(--extra-purple-card-bg); - - .icon svg { - fill: var(--extra-purple-secondary); - } - } - } + @include breakpoint(phone) { + gap: $unit; } .ExtraGrid.Weapons { diff --git a/components/extra/ExtraWeaponsGrid/index.tsx b/components/extra/ExtraWeaponsGrid/index.tsx index e2dbf10c..00874b65 100644 --- a/components/extra/ExtraWeaponsGrid/index.tsx +++ b/components/extra/ExtraWeaponsGrid/index.tsx @@ -30,18 +30,11 @@ const ExtraWeaponsGrid = ({ updateObject, updateUncap, }: Props) => { - const { t } = useTranslation('common') - - const classes = classNames({ - ExtraWeapons: true, - ContainerItem: true, - }) - - const extraWeapons = ( -
    + return ( +
      {Array.from(Array(EXTRA_WEAPONS_COUNT)).map((x, i) => { const itemClasses = classNames({ - Empty: grid[offset + i] === undefined, + [styles.empty]: grid[offset + i] === undefined, }) return ( @@ -60,15 +53,6 @@ const ExtraWeaponsGrid = ({ })}
    ) - - return ( -
    -
    -

    {t('extra_weapons')}

    -
    - {extraWeapons} -
    - ) } export default ExtraWeaponsGrid diff --git a/components/extra/GuidebookResult/index.module.scss b/components/extra/GuidebookResult/index.module.scss index 368e3140..a5406e62 100644 --- a/components/extra/GuidebookResult/index.module.scss +++ b/components/extra/GuidebookResult/index.module.scss @@ -1,14 +1,15 @@ -.GuidebookResult { +.result { border-radius: 6px; display: flex; gap: $unit; padding: $unit * 1.5; + align-items: center; &:hover { background: var(--button-contained-bg); cursor: pointer; - .Info h5 { + .info h5 { color: var(--text-primary); } } @@ -21,7 +22,7 @@ width: 90px; } - .Info { + .info { display: flex; flex-direction: column; flex-grow: 1; diff --git a/components/extra/GuidebookResult/index.tsx b/components/extra/GuidebookResult/index.tsx index 50140740..44b2babc 100644 --- a/components/extra/GuidebookResult/index.tsx +++ b/components/extra/GuidebookResult/index.tsx @@ -16,12 +16,12 @@ const GuidebookResult = (props: Props) => { const guidebook = props.data return ( -
  • +
  • {guidebook.name[locale]} -
    +
    {guidebook.name[locale]}

    {guidebook.description[locale]}

    diff --git a/components/extra/GuidebookUnit/index.module.scss b/components/extra/GuidebookUnit/index.module.scss index 9c6f489d..89af3b67 100644 --- a/components/extra/GuidebookUnit/index.module.scss +++ b/components/extra/GuidebookUnit/index.module.scss @@ -1,4 +1,4 @@ -.GuidebookUnit { +.unit { align-items: center; display: flex; flex-direction: column; @@ -24,7 +24,7 @@ opacity: 1; } - &.editable .GuidebookImage:hover { + &.editable .guidebookImage:hover { border: $hover-stroke; box-shadow: $hover-shadow; cursor: pointer; @@ -57,7 +57,7 @@ text-align: center; } - .GuidebookImage { + .guidebookImage { background: var(--extra-purple-card-bg); border: 1px solid rgba(0, 0, 0, 0); border-radius: $unit; @@ -74,7 +74,7 @@ width: 100%; z-index: 2; - &.Placeholder { + &.placeholder { opacity: 0; } } @@ -92,7 +92,7 @@ } } - .GuidebookName { + .name { font-size: $font-name; line-height: 1.2; @@ -101,7 +101,7 @@ } } - .GuidebookDescription { + .guidebookDescription { font-size: $font-small; line-height: 1.2; text-align: center; diff --git a/components/extra/GuidebookUnit/index.tsx b/components/extra/GuidebookUnit/index.tsx index c5d1d7d6..133b6571 100644 --- a/components/extra/GuidebookUnit/index.tsx +++ b/components/extra/GuidebookUnit/index.tsx @@ -50,10 +50,11 @@ const GuidebookUnit = ({ // Classes const classes = classNames({ - GuidebookUnit: true, - editable: editable, - filled: guidebook !== undefined, - empty: guidebook == undefined, + unit: true, + [styles.unit]: true, + [styles.editable]: editable, + [styles.filled]: guidebook !== undefined, + [styles.empty]: guidebook == undefined, }) const buttonClasses = classNames({ @@ -114,8 +115,10 @@ const GuidebookUnit = ({