From 44209c82af343a5cfef3144aa1a118b01de16910 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 2 Jan 2023 05:10:10 -0800 Subject: [PATCH] Update ExtraWeapons --- components/ExtraWeapons/index.scss | 38 ++++++++++++++++++++---------- components/ExtraWeapons/index.tsx | 2 +- components/WeaponGrid/index.scss | 11 +++++---- components/WeaponGrid/index.tsx | 2 +- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/components/ExtraWeapons/index.scss b/components/ExtraWeapons/index.scss index 8bdcfdaf..4d7b2c49 100644 --- a/components/ExtraWeapons/index.scss +++ b/components/ExtraWeapons/index.scss @@ -1,14 +1,15 @@ #ExtraGrid { background: var(--extra-purple-bg); - border-radius: 8px; + border-radius: $card-corner; box-sizing: border-box; - display: flex; + display: grid; + grid-template-columns: 1.42fr 3fr; justify-content: center; margin: 20px auto; - max-width: 766px; - padding: 16px 16px 16px 0; + max-width: calc($grid-width + 20px); + padding: $unit-2x $unit-2x $unit-2x 0; position: relative; - left: 8px; + left: $unit; @include breakpoint(tablet) { left: auto; @@ -16,6 +17,13 @@ width: 100%; } + @include breakpoint(phone) { + display: flex; + gap: $unit-2x; + padding: $unit-2x; + flex-direction: column; + } + & > span { color: var(--extra-purple-text); display: flex; @@ -24,17 +32,21 @@ justify-content: center; line-height: 1.2; font-weight: 500; - margin-right: 16px; text-align: center; } - .grid_weapons { - display: flex; - flex-direction: row; - flex-wrap: wrap; - margin: 0; - padding: 0; - max-width: 528px; + #ExtraWeapons { + display: grid; + gap: $unit-3x; + grid-template-columns: repeat(3, minmax(0, 1fr)); + + @include breakpoint(tablet) { + gap: $unit-2x; + } + + @include breakpoint(phone) { + gap: $unit; + } } .WeaponUnit .WeaponImage { diff --git a/components/ExtraWeapons/index.tsx b/components/ExtraWeapons/index.tsx index 0e3ae493..e0415ead 100644 --- a/components/ExtraWeapons/index.tsx +++ b/components/ExtraWeapons/index.tsx @@ -23,7 +23,7 @@ const ExtraWeapons = (props: Props) => { return (
{t('extra_weapons')} -