Skip to content

Commit

Permalink
Ensure list is properly rendering empty message
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Nov 6, 2023
1 parent fe67bf8 commit bad6201
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/renderer/src/stories/List.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ export const WithKeys = Template.bind({});
WithKeys.args = {
items: [{ key: "TestKey", value: "test" }],
};

export const Empty = Template.bind({});
Empty.args = {
emptyMessage: 'This is empty',
unordered: true,
items: [],
};

export const EmptyKeys = Template.bind({});
EmptyKeys.args = {
emptyMessage: 'This is empty',
items: [],
};
6 changes: 6 additions & 0 deletions src/renderer/src/stories/List.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export class List extends LitElement {
color: gray;
}
:host([unordered]) #empty {
margin: 0;
}
li {
padding-bottom: 10px;
}
Expand All @@ -55,6 +59,8 @@ export class List extends LitElement {
cursor: move;
}
:host([unordered]) ol {
list-style-type: none;
display: flex;
Expand Down

0 comments on commit bad6201

Please sign in to comment.