Skip to content

Commit

Permalink
updated with single div and improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
suruchee committed Sep 30, 2021
1 parent ceb7f74 commit 9a9a1cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/apps/concepts/components/NamesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ const useStyles = makeStyles((theme: Theme) =>
minWidth: "150px"
},
menuItemSynonym: {
color: "#A9A9A9",
fontStyle: "italic"
opacity: 0.38
}
})
);
Expand Down Expand Up @@ -148,13 +147,15 @@ const NamesTable: React.FC<Props> = ({
>
{NAME_TYPES.map(nameType => (
<MenuItem key={nameType.value} value={nameType.value}>
{nameType.label.includes("Synonym") ? (
<div className={classes.menuItemSynonym}>
({nameType.label})
</div>
) : (
<div>{nameType.label}</div>
)}
<div
className={
nameType.label === "Synonym"
? classes.menuItemSynonym
: undefined
}
>
({nameType.label})
</div>
</MenuItem>
))}
</Field>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ export const DATA_TYPES: string[] = [
];

export const NAME_TYPES: { [key: string]: string }[] = [
{ value: "null", label: "Synonym" }, // value here should be null but inputs html can't handle null as a value
{ value: "FULLY_SPECIFIED", label: "Fully Specified" },
{ value: "null", label: "Synonym" }, // value here should be null but inputs html can't handle null as a value
{ value: "SHORT", label: "Short" },
{ value: "INDEX_TERM", label: "Index Term" }
];
Expand Down

0 comments on commit 9a9a1cf

Please sign in to comment.