Skip to content

Commit

Permalink
feat: unread selection (#1997)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoScalzo committed Jan 4, 2021
1 parent 85f243e commit 9d74d88
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/_listBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
background: var(--sapList_Background);
position: relative;

&--unread {
.#{$block}__title {
font-weight: bold;
}
}

&--no-data {
.#{$block}__title {
text-align: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1544,3 +1544,90 @@ exports[`Storyshots Components/List/Standard Selection 1`] = `

</section>
`;

exports[`Storyshots Components/List/Standard Unread 1`] = `
<section>
<h4>
Unread Options
</h4>


<ul
class="fd-list"
role="list"
>


<li
class="fd-list__item fd-list__item--unread"
role="listitem"
tabindex="0"
>


<span
class="fd-list__title"
>
List item 1 Unread
</span>


</li>


<li
class="fd-list__item fd-list__item--unread"
role="listitem"
tabindex="0"
>


<span
class="fd-list__title"
>
List item 2 Unread
</span>


</li>


<li
class="fd-list__item"
role="listitem"
tabindex="0"
>


<span
class="fd-list__title"
>
List item 3 Read
</span>


</li>


<li
class="fd-list__item"
role="listitem"
tabindex="0"
>


<span
class="fd-list__title"
>
List item 4 Read
</span>


</li>


</ul>


</section>
`;
27 changes: 27 additions & 0 deletions stories/list/standard/standard-list.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,33 @@ standard.parameters = {
}
};

export const unread = () => `<h4>Unread Options</h4>
<ul class="fd-list" role="list">
<li role="listitem" tabindex="0" class="fd-list__item fd-list__item--unread">
<span class="fd-list__title">List item 1 Unread</span>
</li>
<li role="listitem" tabindex="0" class="fd-list__item fd-list__item--unread">
<span class="fd-list__title">List item 2 Unread</span>
</li>
<li role="listitem" tabindex="0" class="fd-list__item">
<span class="fd-list__title">List item 3 Read</span>
</li>
<li role="listitem" tabindex="0" class="fd-list__item">
<span class="fd-list__title">List item 4 Read</span>
</li>
</ul>
`;

unread.storyName = 'Unread';

unread.parameters = {
docs: {
iframeHeight: 445,
storyDescription: `The \`fd-list__item--unread\` modifier will change the font weight to bold for easier legibility.
`
}
};

export const navigation = () => `<ul class="fd-list fd-list--navigation" role="list">
<li tabindex="-1" role="listitem" class="fd-list__item fd-list__item--link">
<a tabindex="0" class="fd-list__link">
Expand Down

0 comments on commit 9d74d88

Please sign in to comment.