Skip to content

Commit

Permalink
added helptext in the dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshaaa19 committed Nov 27, 2024
1 parent e687b65 commit 1b7c318
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
14 changes: 7 additions & 7 deletions src/containers/Template/List/Template.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}

.AlignCenter span {
display: flex;
align-items: flex-start;
}

.Status svg {
Expand Down Expand Up @@ -136,7 +130,7 @@
border-radius: 24px;
border: 1px solid #cccccc;
display: flex;
width: 130px;
width: 140px;
margin: auto;
height: 36px !important;
background: #ffffff;
Expand All @@ -155,3 +149,9 @@
width: 20%;
min-width: 100px;
}

.Select {
display: flex;
align-items: center;
justify-content: space-between;
}
21 changes: 10 additions & 11 deletions src/containers/Template/List/Template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,23 +160,17 @@ export const Template = ({
case 'REJECTED':
statusValue = (
<div className={styles.AlignCenter}>
<span>
<RejectedIcon />
{t('Rejected')}
</span>
<HelpIcon darkIcon={false} helpData={rejectedTemplateInfo} />
<RejectedIcon />
{t('Rejected')}
</div>
);
break;

case 'FAILED':
statusValue = (

Check warning on line 170 in src/containers/Template/List/Template.tsx

View check run for this annotation

Codecov / codecov/patch

src/containers/Template/List/Template.tsx#L170

Added line #L170 was not covered by tests
<div className={styles.AlignCenter}>
<span>
<RejectedIcon />
{t('Failed')}
</span>
<HelpIcon darkIcon={false} helpData={failedTemplateInfo} />
<RejectedIcon />
{t('Failed')}
</div>
);
break;

Check warning on line 176 in src/containers/Template/List/Template.tsx

View check run for this annotation

Codecov / codecov/patch

src/containers/Template/List/Template.tsx#L176

Added line #L176 was not covered by tests
Expand Down Expand Up @@ -331,10 +325,15 @@ export const Template = ({
onChange={handleCheckedBox}
className={styles.DropDown}
data-testid="dropdown-template"
classes={{
select: styles.Select,
}}
>
{statusList.map((status: any) => (
<MenuItem data-testid="template-item" key={status} value={status}>
<MenuItem className={styles.Select} data-testid="template-item" key={status} value={status}>
{status}
{status === 'Rejected' && <HelpIcon darkIcon={false} helpData={rejectedTemplateInfo} />}
{status === 'Failed' && <HelpIcon darkIcon={false} helpData={failedTemplateInfo} />}
</MenuItem>
))}
</Select>
Expand Down

0 comments on commit 1b7c318

Please sign in to comment.