Skip to content

Instantly share code, notes, and snippets.

@techygrrrl
Last active August 24, 2022 03:54
Show Gist options
  • Save techygrrrl/e626ac898e4b6d57b9a1cbdc032fac8f to your computer and use it in GitHub Desktop.
Save techygrrrl/e626ac898e4b6d57b9a1cbdc032fac8f to your computer and use it in GitHub Desktop.
Example base Svelte template
<script>
// You can import any dependencies here, e.g.:
import { toUppercase } from '../utils/to-uppercase'
// If you need to manage state in your component, you can set variables here, e.g.
let myValue = toUppercase('hello')
</script>
<div>
<h1 class="title">My HTML goes here - {myValue}</h1>
</div>
<style>
.title {
color: deeppink;
}
</style>
export const toUppercase = (value) => {
return value.toUpperCase()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment