Skip to content

Commit

Permalink
Update "TagList" data attributes for show-more.jschanges.
Browse files Browse the repository at this point in the history
This updates the logic for the taglist with the new refactored show-more logic.

DDFFORM-69
  • Loading branch information
LasseStaus committed Apr 19, 2024
1 parent d819330 commit af723c1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/stories/Library/tag/tag-list/TagList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ const TagList: FC<TagListProps> = ({ tags }) => {
return (
<>
{tags.length > 1 && (
<div data-show-more-list className="tag-list">
<ul>
<div data-show-more-list-wrapper className="tag-list">
<ul
data-show-more-list
data-initial-visible-items="3"
data-hide-list-button-after-expand="false"
data-show-more-list-id="tag-list"
>
{tags.map((tag, index) => (
<li data-show-more-item>
<Tag key={index} hasBackground size="large">
Expand All @@ -31,6 +36,8 @@ const TagList: FC<TagListProps> = ({ tags }) => {
className="tag tag--fill cursor-pointer"
aria-expanded="false"
data-show-more-button
data-show-more-text="..."
data-show-less-text="-"
>
...
</button>
Expand Down

0 comments on commit af723c1

Please sign in to comment.