Skip to content

Commit

Permalink
Add styling to most recent
Browse files Browse the repository at this point in the history
  • Loading branch information
akileng56 committed Aug 7, 2024
1 parent dfe3537 commit 5eb45c5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/popover/modifier-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
const ModifierComponent: React.FC<Props> = ({listItem,onChangeMostRecent}) => {

Check failure on line 8 in src/components/popover/modifier-panel.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `listItem,onChangeMostRecent` with `⏎··listItem,⏎··onChangeMostRecent,⏎`
return (
<>
<div className={styles.selectedListItem}>
<div className={styles.mostRecentContainer}>
<div> Most Recent #: <span className={styles.modifierLeft}>{listItem?.modifier}</span></div>

Check failure on line 12 in src/components/popover/modifier-panel.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `·Most·Recent·#:·<span·className={styles.modifierLeft}>{listItem?.modifier}</span>` with `⏎··········{"·"}⏎··········Most·Recent·#:{"·"}⏎··········<span·className={styles.modifierLeft}>{listItem?.modifier}</span>⏎········`
<div>
<Subtract className={`${styles.selectedListItemArrow} ${styles.modifier}`} onClick={() => onChangeMostRecent(listItem, "subtract")}/>

Check failure on line 14 in src/components/popover/modifier-panel.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `·className={`${styles.selectedListItemArrow}·${styles.modifier}`}·onClick={()·=>·onChangeMostRecent(listItem,·"subtract")}` with `⏎············className={`${styles.selectedListItemArrow}·${styles.modifier}`}⏎············onClick={()·=>·onChangeMostRecent(listItem,·"subtract")}⏎··········`
Expand Down
8 changes: 4 additions & 4 deletions src/data-visualizer/data-visualizer.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -848,12 +848,12 @@ const DataVisualizer: React.FC = () => {
{selectedParameters.map((parameter) => (
<>
<li
className={styles.rightListItem}
className={`${styles.rightListItem} ${parameter?.showModifierPanel ? styles.openRightListItem : ''} `}
key={parameter.label}
role="menuitem"
>
<div className={styles.selectedListItem}>
<div><ArrowLeft className={styles.selectedListItemArrow}
<div><ArrowLeft className={styles.itemChevronUpDown}
onClick={() => moveAllFromRightToLeft(parameter)}/></div>
{parameter.label}
{
Expand All @@ -863,9 +863,9 @@ const DataVisualizer: React.FC = () => {
<div className={styles.modifierContainer}>
<div>
{ parameter?.showModifierPanel ?
<ChevronUp className={styles.selectedListItemArrow} onClick={() => showModifierPanel(parameter)}/>
<ChevronUp className={styles.itemChevronUpDown} onClick={() => showModifierPanel(parameter)}/>
:
<ChevronDown className={styles.selectedListItemArrow}
<ChevronDown className={styles.itemChevronUpDown}
onClick={() => showModifierPanel(parameter)}/>
}
</div>
Expand Down
42 changes: 33 additions & 9 deletions src/data-visualizer/data-visualizer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,20 @@
}

.rightListItem {
@extend .leftListItem;
list-style-type: none;
padding: 0.75rem 1rem;
@include type.type-style('body-compact-01');

&:hover {
display: unset;
align-items: unset;
background-color: colors.$gray-10-hover;

&::after {
content: none;
.itemChevronUpDown {
display: unset;
}

.selectedListItem {
display: flex;
justify-content: space-between;
}
}
}
Expand Down Expand Up @@ -282,12 +288,12 @@
min-width: 2.5rem;
}

.selectedListItem {
display: flex;
justify-content: space-between;
.selectedListItemArrow {
cursor: pointer;
}

.selectedListItemArrow {
.itemChevronUpDown {
display: none;
cursor: pointer;
}

Expand Down Expand Up @@ -324,3 +330,21 @@
height: 0;
display: none;
}

.mostRecentContainer {
display: flex;
justify-content: space-between;
}

.openRightListItem {
background-color: colors.$gray-10-hover;

.itemChevronUpDown {
display: unset;
}

.selectedListItem {
display: flex;
justify-content: space-between;
}
}

0 comments on commit 5eb45c5

Please sign in to comment.