replace span with button and drop on:keyup

pull/7988/head
Janosh Riebesell 4 years ago committed by GitHub
parent 4bdcffedac
commit b2ac4d76ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,7 +10,7 @@
}
</script>
<span class:expanded on:click={toggle}>{name}</span>
<button class:expanded on:click={toggle}>{name}</button>
{#if expanded}
<ul>
@ -27,12 +27,14 @@
{/if}
<style>
span {
button {
padding: 0 0 0 1.5em;
background: url(/tutorial/icons/folder.svg) 0 0.1em no-repeat;
background-size: 1em 1em;
font-weight: bold;
cursor: pointer;
border: none;
margin: 0;
}
.expanded {

@ -10,7 +10,7 @@
}
</script>
<span class:expanded on:click={toggle} on:keyup={toggle}>{name}</span>
<button class:expanded on:click={toggle}>{name}</button>
{#if expanded}
<ul>
@ -27,12 +27,14 @@
{/if}
<style>
span {
button {
padding: 0 0 0 1.5em;
background: url(/tutorial/icons/folder.svg) 0 0.1em no-repeat;
background-size: 1em 1em;
font-weight: bold;
cursor: pointer;
border: none;
margin: 0;
}
.expanded {

Loading…
Cancel
Save