Skip to content

Commit

Permalink
fix ususual space around project selection card (#4676)
Browse files Browse the repository at this point in the history
* fix ususual space around project selection card

Signed-off-by: JanhaviAlekar <[email protected]>

* Removed .grow class

Signed-off-by: JanhaviAlekar <[email protected]>

* removing grow class

Signed-off-by: JanhaviAlekar <[email protected]>

---------

Signed-off-by: JanhaviAlekar <[email protected]>
Signed-off-by: Janhavi Alekar <[email protected]>
Co-authored-by: Namkyu Park <[email protected]>
  • Loading branch information
JanhaviAlekar and namkyu1999 authored Aug 2, 2024
1 parent 691058d commit 86e2dd7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
.gap-4 {
gap: 1rem;
}
.grow {
flex-grow: 1;
}
.cardListContainer {
display: grid;
gap: 1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ declare namespace ProjectSelectorListModuleScssNamespace {
cardListContainer: string;
gap2: string;
gap4: string;
grow: string;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react';
import { Container, Layout, Text } from '@harnessio/uicore';
import { Icon } from '@harnessio/icons';
import { Color, FontVariation } from '@harnessio/design-system';
import cx from 'classnames';
import { auto } from '@popperjs/core';
import { useStrings } from '@strings';
import ProjectCard from '@components/ProjectCard';
import Loader from '@components/Loader';
Expand Down Expand Up @@ -34,27 +32,20 @@ export default function ProjectSelectorListView({
<Text font={{ variation: FontVariation.H5 }}>{getString('selectProject')}</Text>
<Container margin={{ top: 'small' }}>{searchBar}</Container>
</Container>
<Layout.Vertical
width="100%"
style={{ height: 'calc(100% - 96px)', overflow: auto }}
className={cx(styles.grow, styles.gap2)}
>
<Layout.Vertical width="100%" className={styles.gap2}>
<Text font={{ variation: FontVariation.H6 }}>
{getString('total')}: {projectList?.length ?? 0}
</Text>
{projectList && projectList.length > 0 ? (
<Container className={cx(styles.grow, styles.cardListContainer)}>
<Container className={styles.cardListContainer}>
{projectList?.map(project => (
<ProjectCard key={project.projectID} data={project} />
))}
</Container>
) : (
projectList?.length === 0 &&
totalProjects !== 0 && (
<Layout.Vertical
className={cx(styles.grow, styles.gap2)}
flex={{ justifyContent: 'center', alignItems: 'center' }}
>
<Layout.Vertical className={styles.gap2} flex={{ justifyContent: 'center', alignItems: 'center' }}>
<Icon name="nav-project" size={50} />
<Text font={{ variation: FontVariation.BODY }}>
{getString('noProjectFoundMatchingSearch', { searchTerm })}
Expand Down

0 comments on commit 86e2dd7

Please sign in to comment.