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

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

Loading…
Cancel
Save