Skip to content

Commit 1f28928

Browse files
committed
Updating notes toggle to show the first note and toggle the rest, if there are more than one.
1 parent 678bd8b commit 1f28928

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/modules/resource-acccess/components/Holder/index.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,10 @@ const notesList = (notes) => {
1313
return null;
1414
}
1515

16-
if (notes.length === 1) {
17-
return (
18-
<Expandable>
19-
<ExpandableChildren show={0}>
20-
<p className='text-grey__light margin-bottom__none'>
21-
{notes[0]}
22-
</p>
23-
</ExpandableChildren>
24-
<ExpandableButton
25-
name='holdings note'
26-
count={notes.length}
27-
/>
28-
</Expandable>
29-
);
30-
}
31-
3216
return (
3317
<Expandable>
3418
<ul className='margin-bottom__none'>
35-
<ExpandableChildren show={0}>
19+
<ExpandableChildren show={1}>
3620
{notes.map((note, index) => {
3721
return (
3822
<li
@@ -46,7 +30,7 @@ const notesList = (notes) => {
4630
</ExpandableChildren>
4731
</ul>
4832

49-
{notes.length > 0 && (
33+
{notes.length > 1 && (
5034
<ExpandableButton
5135
name='holdings notes'
5236
count={notes.length}

src/modules/resource-acccess/components/Holder/styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
}
44

55
.holder-content > ul + .btn {
6-
margin-left: 2.5rem;
76
margin-top: 0;
87
}
98

0 commit comments

Comments
 (0)