From fde6842dabef15f6808b084929c23f6d6b289c8c Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 18 Dec 2022 02:19:41 -0600 Subject: [PATCH] Refactor SVG colors into globals.scss --- src/components/BoxGraphic.tsx | 22 +++++++++------------- src/styles/globals.scss | 7 +++++++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/BoxGraphic.tsx b/src/components/BoxGraphic.tsx index 9385281..1f0cf48 100644 --- a/src/components/BoxGraphic.tsx +++ b/src/components/BoxGraphic.tsx @@ -1,4 +1,5 @@ import React from "react"; +import {classNames} from "@/utils/helpers"; interface BoxGraphicProps { id?: string; @@ -6,11 +7,6 @@ interface BoxGraphicProps { children: React.ReactNode; } -const leftColor = "#ad8d6c"; -const rightColor = "#8f704e"; -const topColor = "#c9aa8a"; -const textColor = "#fff"; - const A = [190, 0]; const B = [345, 90]; const C = [345, 275]; @@ -20,18 +16,18 @@ const F = [10, 70]; const Z = [175, 155]; const BoxGraphic = ({id, children, className}: BoxGraphicProps) => { - return + return - - - + + + {/* Matrix applies isometric transform, rotate for adjustment, translate to place on top of box */} - + textAnchor="middle"> {children} diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 1d56dd0..6c8e5a7 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -44,4 +44,11 @@ body { @apply max-w-full max-h-full -translate-y-[40%]; } } +} + +.box-graphic { + .top { @apply fill-[#c9aa8a]; } + .left { @apply fill-[#ad8d6c]; } + .right {@apply fill-[#8f704e];} + .text { @apply fill-white; } } \ No newline at end of file