From fe27b18366cf719b1009e05e628388098d4d2833 Mon Sep 17 00:00:00 2001 From: Helena Standaert Date: Tue, 23 Apr 2024 11:03:06 +0200 Subject: [PATCH] Fix WAVE warnings --- src/components/Button.tsx | 11 ++++-- src/components/Header.tsx | 7 +++- src/components/Navigation.tsx | 8 +--- src/components/NewsTeaser.tsx | 69 ++++++++++++++++++++--------------- src/components/Switch.tsx | 11 ++++-- src/index.css | 12 +++++- tailwind.config.js | 8 ++-- 7 files changed, 78 insertions(+), 48 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index d984bb6..bfcb5a9 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,3 +1,4 @@ +import { useAppState } from "@/providers"; import type { ButtonHTMLAttributes, PropsWithChildren } from "react"; import { twMerge } from "tailwind-merge"; @@ -5,14 +6,18 @@ export type ButtonProps = PropsWithChildren & ButtonHTMLAttributes; function Button({ type = "button", className, ...props }: ButtonProps) { + const { isCompliant } = useAppState(); + return ( - + ); } diff --git a/src/index.css b/src/index.css index 60ac96c..6774a17 100644 --- a/src/index.css +++ b/src/index.css @@ -8,13 +8,23 @@ } body.compliant { - @apply font-noto; + @apply font-noto bg-backgroundCompliant; } body.compliant p { @apply max-w-[60ch]; } + body:not(.compliant) p, + body:not(.compliant) h1, + body:not(.compliant) h2, + body:not(.compliant) h3, + body:not(.compliant) h4, + body:not(.compliant) h5, + body:not(.compliant) h6 { + @apply leading-none; + } + body.compliant button, body.compliant a, body.compliant input, diff --git a/tailwind.config.js b/tailwind.config.js index a5dddd8..07895c4 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -8,14 +8,16 @@ export default { white: "#ffffff", black: "#000000", gray: "#cccccc", - blueZodiac: "#0a1930", + blueZodiac: "#0a1931", green: "#00ff00", brightTurquoise: "#00e5ff", - red: "#EF5350", + red: "#ef5350", + orange: "#ec7100", // specific - outlineColor: "#93C700", + outlineColor: "#ec7100", background: "#007da3", + backgroundCompliant: "#094f64", }, fontFamily: {