2018-03-12 03:40:32 +01:00
|
|
|
<ul class="generic-dialog-list">
|
|
|
|
{{#each items as item @key}}
|
|
|
|
<li class="generic-dialog-list-item">
|
|
|
|
<button class="generic-dialog-list-button" on:click="fire('click', item)">
|
2018-03-16 16:42:10 +01:00
|
|
|
<svg class="generic-dialog-list-item-svg">
|
2018-04-30 02:45:03 +02:00
|
|
|
<use xlink:href={{item.icon}} />
|
2018-03-12 03:40:32 +01:00
|
|
|
</svg>
|
|
|
|
<span>
|
|
|
|
{{item.label}}
|
|
|
|
</span>
|
2018-04-30 02:45:03 +02:00
|
|
|
<svg class="generic-dialog-list-item-svg {{item.selected ? '' : 'hidden'}}" aria-hidden={{!item.selected}}>
|
2018-03-12 03:40:32 +01:00
|
|
|
<use xlink:href="#fa-check" />
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
<style>
|
|
|
|
.generic-dialog-list {
|
|
|
|
list-style: none;
|
|
|
|
width: 100%;
|
|
|
|
border: 1px solid var(--settings-list-item-border);
|
|
|
|
box-sizing: border-box;
|
|
|
|
min-width: 300px;
|
|
|
|
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 16:42:10 +01:00
|
|
|
.generic-dialog-list-item-svg {
|
2018-03-12 03:40:32 +01: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;
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button span {
|
|
|
|
flex: 1;
|
|
|
|
text-align: left;
|
|
|
|
margin-left: 20px;
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button:hover {
|
|
|
|
background: var(--settings-list-item-bg-hover);
|
|
|
|
}
|
|
|
|
.generic-dialog-list-button:active {
|
|
|
|
background: var(--settings-list-item-bg-active);
|
|
|
|
}
|
|
|
|
</style>
|