Skip to content

Instantly share code, notes, and snippets.

@Sebastian-Fitzner
Last active May 21, 2022 22:10
Show Gist options
  • Save Sebastian-Fitzner/346c1f4d22cb8368068f3817766a5444 to your computer and use it in GitHub Desktop.
Save Sebastian-Fitzner/346c1f4d22cb8368068f3817766a5444 to your computer and use it in GitHub Desktop.
Scrollable List
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