From d65aa5f7ca1fe9543779c84db29f26c9ac2ddafb Mon Sep 17 00:00:00 2001 From: snehalsankhe Date: Thu, 9 May 2024 17:55:44 +0530 Subject: [PATCH] Solved bugs --- ui/src/components/MainHeader/index.scss | 38 ++++++++++++++++++- ui/src/components/MainHeader/index.tsx | 21 +++++----- ui/src/components/ProjectsHeader/index.tsx | 5 ++- .../projectsHeader.interface.ts | 2 + ui/src/pages/Projects/index.tsx | 1 + ui/src/scss/App.scss | 8 ++++ 6 files changed, 62 insertions(+), 13 deletions(-) diff --git a/ui/src/components/MainHeader/index.scss b/ui/src/components/MainHeader/index.scss index 36ba78e2e..59a70f0f5 100644 --- a/ui/src/components/MainHeader/index.scss +++ b/ui/src/components/MainHeader/index.scss @@ -17,6 +17,42 @@ // height: 2rem; margin-right: 1rem; position: relative; - width: 2rem; + width: 3rem; + a { + align-items: center; + display: flex; + height: 2.5rem; + justify-content: center; + padding: .5rem; + text-decoration: none; + } + a:focus { + border-radius: 5px; + box-shadow: 0 0 1px $color-brand-primary-base, 0 0 0 4px #bbb4f4; + } + } + .organisationWrapper:focus { + box-shadow: 0 0 1px $color-brand-primary-base, 0 0 0 4px #bbb4f4; + } + .Dropdown__header__value { + overflow: visible; + line-height: 1.2; + } + .Dropdown__header__label { + margin-bottom: 0; + } + .Dropdown.Dropdown--hover .Dropdown__menu--primary { + top: 2.5rem; + } + .organisationWrapper { + .Dropdown__header__value { + color: #475161; + max-width: 11.1875rem; + width: auto; + overflow: hidden; + } + .Dropdown__menu--primary .Dropdown__menu__list__item, .Dropdown__menu--secondary .Dropdown__menu__list__item, .Dropdown__menu--tertiary .Dropdown__menu__list__item { + max-width: 14.5rem; + } } } diff --git a/ui/src/components/MainHeader/index.tsx b/ui/src/components/MainHeader/index.tsx index cd3aa7dc0..c3e6077aa 100644 --- a/ui/src/components/MainHeader/index.tsx +++ b/ui/src/components/MainHeader/index.tsx @@ -1,7 +1,7 @@ // Libraries import { useContext, useEffect, useState } from 'react'; -import { useNavigate, useLocation } from 'react-router-dom'; -import { Dropdown } from '@contentstack/venus-components'; +import { useNavigate, useLocation, Link } from 'react-router-dom'; +import { Dropdown, Tooltip } from '@contentstack/venus-components'; // Service import { getCMSDataFromFile } from '../../cmsData/cmsSelector'; @@ -100,21 +100,20 @@ const MainHeader = () => {
{logo?.image?.url ? (
- - Contentstack Logo - + + + Contentstack Logo + +
) : ( '' )} -
-
{organizationLabel}
+
{ let interval: ReturnType; @@ -21,6 +22,7 @@ const ProjectsHeader = ({ } const SearchProject = ( <> + {allProject && allProject?.length > 0 && (
+ )} ); @@ -57,7 +60,7 @@ const ProjectsHeader = ({ return ( <> - + 0 && pageActions} /> ); }; diff --git a/ui/src/components/ProjectsHeader/projectsHeader.interface.ts b/ui/src/components/ProjectsHeader/projectsHeader.interface.ts index 7555fae49..8341fa11b 100644 --- a/ui/src/components/ProjectsHeader/projectsHeader.interface.ts +++ b/ui/src/components/ProjectsHeader/projectsHeader.interface.ts @@ -1,4 +1,5 @@ import { CTA } from '../../types/common.interface'; +import { ProjectsObj } from '../../pages/Projects/projects.interface' export interface ProjectsHeaderType { cta?: CTA; @@ -7,4 +8,5 @@ export interface ProjectsHeaderType { setSearchText: (value: string) => void; searchPlaceholder: string; handleModal?: () => void; + allProject?: ProjectsObj[] | null; } diff --git a/ui/src/pages/Projects/index.tsx b/ui/src/pages/Projects/index.tsx index 213c3ed5d..af100a145 100644 --- a/ui/src/pages/Projects/index.tsx +++ b/ui/src/pages/Projects/index.tsx @@ -147,6 +147,7 @@ const Projects = () => { setSearchText={setSearchText} cta={cta} handleModal={openModal} + allProject={projects} /> ) diff --git a/ui/src/scss/App.scss b/ui/src/scss/App.scss index e7ffb519d..1e24a7b4b 100644 --- a/ui/src/scss/App.scss +++ b/ui/src/scss/App.scss @@ -339,3 +339,11 @@ h2 { } } } +.ReactModal__Overlay .ReactModal__Content .ReactModal__Content__header h3 { + color: $color-black-2121; + font-weight: bold; +} +.ReactModal__Content__footer .Button{ + font-size: 1rem; + line-height: 100%; +} \ No newline at end of file