diff --git a/src/components/Radar/Label.module.css b/src/components/Radar/Label.module.css new file mode 100644 index 0000000..9a96970 --- /dev/null +++ b/src/components/Radar/Label.module.css @@ -0,0 +1,46 @@ +.label { + width: 240px; + min-height: 210px; + position: absolute; + top: 0; + left: 0; +} + +.header { + display: flex; + justify-content: space-between; + padding: 10px 0; + margin: 0 0 15px; + border-bottom: 2px solid var(--quadrant-color); + text-transform: uppercase; + font-size: 12px; +} + +.title { + margin: 0 0 10px; +} + +.icon { + fill: var(--highlight); + display: inline-block; + vertical-align: middle; + margin: 0 5px 0 0; + width: 16px; + height: 16px; +} + +.description { + font-size: 14px; +} + +.position-2, +.position-4 { + left: auto; + right: 0; +} + +.position-3, +.position-4 { + top: auto; + bottom: 0; +} diff --git a/src/components/Radar/Label.tsx b/src/components/Radar/Label.tsx new file mode 100644 index 0000000..4375155 --- /dev/null +++ b/src/components/Radar/Label.tsx @@ -0,0 +1,36 @@ +import Link from "next/link"; +import { CSSProperties, useMemo } from "react"; + +import styles from "./Label.module.css"; + +import Pie from "@/components/Icons/Pie"; +import { Quadrant } from "@/lib/types"; +import { cn } from "@/lib/utils"; + +interface LabelProps { + quadrant: Quadrant; +} + +export function Label({ quadrant }: LabelProps) { + const style = useMemo( + () => ({ "--quadrant-color": quadrant.color }) as CSSProperties, + [quadrant.color], + ); + + return ( +
{quadrant.description}
+