WIP React > Svelte

Put most of the developed design into Svelte
This commit is contained in:
2020-02-11 15:09:32 +01:00
parent 61e45cb171
commit 9b0c154f61
95 changed files with 3627 additions and 9464 deletions

15
src/atoms/Button.svelte Normal file
View File

@@ -0,0 +1,15 @@
<script>
export let href
export let type
export let text = ''
// Transformed text into spans
const textSpans = text
.replace(/(<.*?>)|(.)/g, letter => letter.replace(/./g, '<span>$&</span>'))
.replace(/ /g, '\u00a0')
</script>
<a {href} class={type} aria-label={text} data-text={text}>
<slot></slot>
{@html textSpans}
</a>