From 247c066bf2a4d19893d026cae50da2f3b1f84ef9 Mon Sep 17 00:00:00 2001 From: Erik Goens Date: Mon, 26 Aug 2024 05:27:40 -0700 Subject: [PATCH] adds classname conditional on H2 to add class definition flexibility --- next/components/mdx/components.tsx | 15 ++++++++++----- next/pages/guidelines/color/palette.tsx | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/next/components/mdx/components.tsx b/next/components/mdx/components.tsx index ff046af1..95180e8c 100644 --- a/next/components/mdx/components.tsx +++ b/next/components/mdx/components.tsx @@ -20,6 +20,12 @@ const sourceCodePro = Source_Code_Pro({ subsets: ['latin'], }); +// TODO: apply atomicClasses to other headers once +// type definition error is resolved (see H2) +interface HeadingElement extends HTMLHeadingElement { + atomicClasses?: string; +} + const HashAnchor = ({ children, id }: { children: React.ReactNode; id: string }): JSX.Element => (