From 2da9c929dd0daa769a69a1d64fe35821bdbfc9a9 Mon Sep 17 00:00:00 2001 From: zahidalidev Date: Mon, 23 Jun 2025 23:09:38 +0500 Subject: [PATCH] Updated banner opacity --- src/components/Layout.tsx | 6 ++++-- src/components/TopBanner.tsx | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 15db2fdf1..d68ef84c6 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -12,6 +12,7 @@ import {useEffect, useState} from 'react'; import {LogoMark} from './LogoMark'; import VersionSelector from './VersionSelector'; import {Search} from './search/Search'; +import {TopBanner} from './TopBanner' function GitHubIcon(props: React.ComponentPropsWithoutRef<'svg'>) { return ( @@ -110,13 +111,14 @@ export function Layout({children}: {children: React.ReactNode}) {
{/* Cody docs banner */} - {/* {isCodyDocs && !isopenCtxDocs && } */} + opacity='0.75' + />} {/* Openctx docs banner */} {/* {isopenCtxDocs && { + hex = hex.replace(/^#/, ''); + const r = parseInt(hex.slice(0, 2), 16); + const g = parseInt(hex.slice(2, 4), 16); + const b = parseInt(hex.slice(4, 6), 16); + + return `${r}, ${g}, ${b}`; } export function TopBanner({ @@ -17,6 +27,7 @@ export function TopBanner({ backgroundColor = "#F34E3F", textColor = "white", linkText = 'new docs', + opacity = '1' }: TopBannerProps) { const [isVisible, setIsVisible] = useState(true); @@ -24,7 +35,7 @@ export function TopBanner({ return (