Skip to content

Commit

Permalink
feat(ui): add nested list option for html section EBS-1547 (#235)
Browse files Browse the repository at this point in the history
* feat(ui): add nested list option for html section EBS-1547

* fix(style): nested list option style EBS-1547

---------

Co-authored-by: Vanessa.Jalakas <[email protected]>
Co-authored-by: Mihkel.Paloots <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent a7dc4e9 commit 48d71a6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libs/styles/src/lib/scss/components/_html-section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@
}
}

li li {
&.list-style-none {
list-style: none;
padding-left: 0;
}

&:not(.list-style-none) {
padding-left: 18px;
}
}

p, a {
overflow-wrap: break-word;
min-width: 0;
Expand Down
25 changes: 25 additions & 0 deletions libs/ui/src/lib/html-section/html-section.component.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,28 @@ export const List = {
`,
},
};

export const NestedList = {
...Default,
args: {
html: `
<p>Ordered nested list</p>
<ol>
<li>Heading one:
<ul>
<li>Step one</li>
<li>Step two</li>
<li>Step three</li>
</ul>
</li>
<li>Heading two:
<ul>
<li>Step one</li>
<li>Step two</li>
<li>Step three</li>
</ul>
</li>
</ol>
`,
},
};

0 comments on commit 48d71a6

Please sign in to comment.