Last active
May 21, 2022 22:10
-
-
Save Sebastian-Fitzner/346c1f4d22cb8368068f3817766a5444 to your computer and use it in GitHub Desktop.
Scrollable List
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ScrollableList = ({ listItems }) => { | |
return ( | |
<div className="c-scrollable-list"> | |
<ul className="c-scrollable-list__list"> | |
{listItems.map((item) => { | |
return ( | |
<li key={item.title} className="c-scrollable-list__list-item"> | |
<a href="#" className="c-scrollable-list__link"> | |
{item.title} | |
</a> | |
</li> | |
) | |
})} | |
</ul> | |
<div className="c-scrollable-list__slide-buttons"> | |
<button | |
className="c-scrollable-list__button is-show-less" | |
type="button" | |
> | |
Previous | |
</button> | |
<button | |
className="c-scrollable-list__button is-show-more" | |
type="button" | |
> | |
Next | |
</button> | |
</div> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment