feat(SW-184): added main components for new header

This commit is contained in:
Erik Tiekstra
2024-08-19 12:52:35 +02:00
parent 70297bec91
commit 08cde7ae2f
31 changed files with 548 additions and 26 deletions

View File

@@ -0,0 +1,30 @@
"use client"
import { useState } from "react"
import { ChevronDownIcon, GlobeIcon } from "@/components/Icons"
import Button from "../Button"
import styles from "./languageSwitcher.module.css"
export default function LanguageSwitcher() {
const [isExpanded, setIsExpanded] = useState(false)
function handleButtonClick() {
setIsExpanded((prev) => !prev)
}
return (
<Button onClick={handleButtonClick}>
<GlobeIcon width={20} height={20} color="burgundy" />
<span>English</span>
<ChevronDownIcon
className={`${styles.chevron} ${isExpanded ? styles.isExpanded : ""}`}
width={20}
height={20}
color="burgundy"
/>
</Button>
)
}

View File

@@ -0,0 +1,17 @@
.button {
background-color: transparent;
color: var(--Base-Text-High-contrast);
border-width: 0;
cursor: pointer;
display: flex;
gap: var(--Spacing-x1);
align-items: center;
}
.chevron {
transition: transform 0.2s;
}
.chevron.isExpanded {
transform: rotate(180deg);
}