2018-03-12 02:40:32 +00:00
|
|
|
<ul class="generic-dialog-list">
|
2018-05-02 00:05:36 +00:00
|
|
|
{#each items as item (item.key)}
|
2018-03-12 02:40:32 +00:00
|
|
|
<li class="generic-dialog-list-item">
|
|
|
|
<button class="generic-dialog-list-button" on:click="fire('click', item)">
|
2018-03-16 15:42:10 +00:00
|
|
|
<svg class="generic-dialog-list-item-svg">
|
2018-12-10 08:13:54 +00:00
|
|
|
<use xlink:href={item.icon} />
|
2018-03-12 02:40:32 +00:00
|
|
|
</svg>
|
2018-08-18 05:26:08 +00:00
|
|
|
<span class="generic-dialog-list-button-span">
|
|
|
|
{item.label}
|
|
|
|
</span>
|
|
|
|
{#if selectable}
|
|
|
|
<svg class="generic-dialog-list-item-svg {item.selected ? '' : 'hidden'}" aria-hidden={!item.selected}>
|
2018-12-10 08:13:54 +00:00
|
|
|
<use xlink:href="#fa-check" />
|
2018-08-18 05:26:08 +00:00
|
|
|
</svg>
|
|
|
|
{/if}
|
2018-03-12 02:40:32 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2018-05-02 00:05:36 +00:00
|
|
|
{/each}
|
2018-03-12 02:40:32 +00:00
|
|
|
</ul>
|
|
|
|
<style>
|
|
|
|
.generic-dialog-list {
|
|
|
|
list-style: none;
|
|
|
|
width: 100%;
|
|
|
|
border: 1px solid var(--settings-list-item-border);
|
|
|
|
box-sizing: border-box;
|
2018-08-18 05:26:08 +00:00
|
|
|
min-width: 350px;
|
2018-03-12 02:40:32 +00:00
|
|
|
max-width: calc(100vw - 20px);
|
|
|
|
}
|
|
|
|
.generic-dialog-list-item {
|
|
|
|
border: 1px solid var(--settings-list-item-border);
|
|
|
|
font-size: 1.2em;
|
|
|
|
display: flex;
|
|
|
|
}
|
2018-03-16 15:42:10 +00:00
|
|
|
.generic-dialog-list-item-svg {
|
2018-03-12 02:40:32 +00:00
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
fill: var(--svg-fill);
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button {
|
|
|
|
flex: 1;
|
|
|
|
padding: 20px;
|
|
|
|
background: var(--settings-list-item-bg);
|
|
|
|
border: none;
|
|
|
|
margin: 0;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
2018-08-18 05:26:08 +00:00
|
|
|
.generic-dialog-list-button-span {
|
2018-03-12 02:40:32 +00:00
|
|
|
flex: 1;
|
|
|
|
margin-left: 20px;
|
2018-08-18 05:26:08 +00:00
|
|
|
text-align: left;
|
|
|
|
width: 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2018-03-12 02:40:32 +00:00
|
|
|
}
|
|
|
|
.generic-dialog-list-button:hover {
|
|
|
|
background: var(--settings-list-item-bg-hover);
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button:active {
|
|
|
|
background: var(--settings-list-item-bg-active);
|
|
|
|
}
|
2018-08-18 05:26:08 +00:00
|
|
|
|
|
|
|
@media (max-width: 767px) {
|
2018-08-26 05:03:40 +00:00
|
|
|
.generic-dialog-list-button {
|
|
|
|
padding: 20px 10px;
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button-span {
|
|
|
|
margin-left: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 479px) {
|
2018-08-18 05:26:08 +00:00
|
|
|
.generic-dialog-list {
|
|
|
|
min-width: calc(100vw - 20px);
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button {
|
2018-08-26 05:03:40 +00:00
|
|
|
padding: 15px 10px;
|
2018-08-18 05:26:08 +00:00
|
|
|
}
|
|
|
|
.generic-dialog-list-button-span {
|
|
|
|
margin-left: 10px;
|
|
|
|
}
|
|
|
|
}
|
2018-12-10 08:13:54 +00:00
|
|
|
</style>
|